tasksource/leandojo huggingface dataset:
Theorem: linearIndependent_set_iff_affineIndependent_vadd_union_singleton
File: Mathlib/LinearAlgebra/AffineSpace/Independent.lean

tactic: rw [affineIndependent_set_iff_linearIndependent_vsub k
    (Set.mem_union_left _ (Set.mem_singleton p₁))]
state_before: k : Type u_2
V : Type u_1
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type ?u.119726
s : Set V
hs : ∀ (v : V), v ∈ s → v ≠ 0
p₁ : P
⊢ (LinearIndependent k fun v => ↑v) ↔ AffineIndependent k fun p => ↑p

tactic: have h : (fun p => (p -ᵥ p₁ : V)) '' (({p₁} ∪ (fun v => v +ᵥ p₁) '' s) \ {p₁}) = s := by
  simp_rw [Set.union_diff_left, Set.image_diff (vsub_left_injective p₁), Set.image_image,
    Set.image_singleton, vsub_self, vadd_vsub, Set.image_id']
  exact Set.diff_singleton_eq_self fun h => hs 0 h rfl
state_before: k : Type u_2
V : Type u_1
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type ?u.119726
s : Set V
hs : ∀ (v : V), v ∈ s → v ≠ 0
p₁ : P
⊢ (LinearIndependent k fun v => ↑v) ↔ LinearIndependent k fun v => ↑v

tactic: rw [h]
state_before: k : Type u_2
V : Type u_1
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type ?u.119726
s : Set V
hs : ∀ (v : V), v ∈ s → v ≠ 0
p₁ : P
h : (fun p => p -ᵥ p₁) '' (({p₁} ∪ (fun v => v +ᵥ p₁) '' s) \ {p₁}) = s
⊢ (LinearIndependent k fun v => ↑v) ↔ LinearIndependent k fun v => ↑v

tactic: simp_rw [Set.union_diff_left, Set.image_diff (vsub_left_injective p₁), Set.image_image,
  Set.image_singleton, vsub_self, vadd_vsub, Set.image_id']
state_before: k : Type u_2
V : Type u_1
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type ?u.119726
s : Set V
hs : ∀ (v : V), v ∈ s → v ≠ 0
p₁ : P
⊢ (fun p => p -ᵥ p₁) '' (({p₁} ∪ (fun v => v +ᵥ p₁) '' s) \ {p₁}) = s

tactic: exact Set.diff_singleton_eq_self fun h => hs 0 h rfl
state_before: k : Type u_2
V : Type u_1
P : Type u_3
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type ?u.119726
s : Set V
hs : ∀ (v : V), v ∈ s → v ≠ 0
p₁ : P
⊢ s \ {0} = s
Theorem: TensorProduct.directSum_lof_tmul_lof
File: Mathlib/LinearAlgebra/DirectSum/TensorProduct.lean

tactic: simp [TensorProduct.directSum]
state_before: R : Type u
inst✝¹⁰ : CommRing R
ι₁ : Type v₁
ι₂ : Type v₂
inst✝⁹ : DecidableEq ι₁
inst✝⁸ : DecidableEq ι₂
M₁ : ι₁ → Type w₁
M₁' : Type w₁'
M₂ : ι₂ → Type w₂
M₂' : Type w₂'
inst✝⁷ : (i₁ : ι₁) → AddCommGroup (M₁ i₁)
inst✝⁶ : AddCommGroup M₁'
inst✝⁵ : (i₂ : ι₂) → AddCommGroup (M₂ i₂)
inst✝⁴ : AddCommGroup M₂'
inst✝³ : (i₁ : ι₁) → Module R (M₁ i₁)
inst✝² : Module R M₁'
inst✝¹ : (i₂ : ι₂) → Module R (M₂ i₂)
inst✝ : Module R M₂'
i₁ : ι₁
m₁ : M₁ i₁
i₂ : ι₂
m₂ : M₂ i₂
⊢ ↑(TensorProduct.directSum R M₁ M₂) (↑(lof R ι₁ M₁ i₁) m₁ ⊗ₜ[R] ↑(lof R ι₂ M₂ i₂) m₂) =
    ↑(lof R (ι₁ × ι₂) (fun i => M₁ i.fst ⊗[R] M₂ i.snd) (i₁, i₂)) (m₁ ⊗ₜ[R] m₂)
Theorem: DiscreteValuationRing.addVal_eq_top_iff
File: Mathlib/RingTheory/DiscreteValuationRing/Basic.lean

tactic: have hi := (Classical.choose_spec (exists_prime R)).irreducible
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : DiscreteValuationRing R
a : R
⊢ ↑(addVal R) a = ⊤ ↔ a = 0

tactic: constructor
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : DiscreteValuationRing R
a : R
hi : Irreducible (choose (_ : ∃ ϖ, Prime ϖ))
⊢ ↑(addVal R) a = ⊤ ↔ a = 0

tactic: contrapose
state_before: case mp
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : DiscreteValuationRing R
a : R
hi : Irreducible (choose (_ : ∃ ϖ, Prime ϖ))
⊢ ↑(addVal R) a = ⊤ → a = 0

tactic: intro h
state_before: case mp
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : DiscreteValuationRing R
a : R
hi : Irreducible (choose (_ : ∃ ϖ, Prime ϖ))
⊢ ¬a = 0 → ¬↑(addVal R) a = ⊤

tactic: obtain ⟨n, ha⟩ := associated_pow_irreducible h hi
state_before: case mp
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : DiscreteValuationRing R
a : R
hi : Irreducible (choose (_ : ∃ ϖ, Prime ϖ))
h : ¬a = 0
⊢ ¬↑(addVal R) a = ⊤

tactic: obtain ⟨u, rfl⟩ := ha.symm
state_before: case mp.intro
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : DiscreteValuationRing R
a : R
hi : Irreducible (choose (_ : ∃ ϖ, Prime ϖ))
h : ¬a = 0
n : ℕ
ha : Associated a (choose (_ : ∃ ϖ, Prime ϖ) ^ n)
⊢ ¬↑(addVal R) a = ⊤

tactic: rw [mul_comm, addVal_def' u hi n]
state_before: case mp.intro.intro
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : DiscreteValuationRing R
hi : Irreducible (choose (_ : ∃ ϖ, Prime ϖ))
n : ℕ
u : Rˣ
h : ¬choose (_ : ∃ ϖ, Prime ϖ) ^ n * ↑u = 0
ha : Associated (choose (_ : ∃ ϖ, Prime ϖ) ^ n * ↑u) (choose (_ : ∃ ϖ, Prime ϖ) ^ n)
⊢ ¬↑(addVal R) (choose (_ : ∃ ϖ, Prime ϖ) ^ n * ↑u) = ⊤

tactic: exact PartENat.natCast_ne_top _
state_before: case mp.intro.intro
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : DiscreteValuationRing R
hi : Irreducible (choose (_ : ∃ ϖ, Prime ϖ))
n : ℕ
u : Rˣ
h : ¬choose (_ : ∃ ϖ, Prime ϖ) ^ n * ↑u = 0
ha : Associated (choose (_ : ∃ ϖ, Prime ϖ) ^ n * ↑u) (choose (_ : ∃ ϖ, Prime ϖ) ^ n)
⊢ ¬↑n = ⊤

tactic: rintro rfl
state_before: case mpr
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : DiscreteValuationRing R
a : R
hi : Irreducible (choose (_ : ∃ ϖ, Prime ϖ))
⊢ a = 0 → ↑(addVal R) a = ⊤

tactic: exact addVal_zero
state_before: case mpr
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : DiscreteValuationRing R
hi : Irreducible (choose (_ : ∃ ϖ, Prime ϖ))
⊢ ↑(addVal R) 0 = ⊤
Theorem: Nat.div_add_mod
File: src/lean/Init/Data/Nat/Div.lean

tactic: rw [div_eq, mod_eq]
state_before: m n : Nat
⊢ n * (m / n) + m % n = m

tactic: have h : Decidable (0 < n ∧ n ≤ m) := inferInstance
state_before: m n : Nat
⊢ n * ite (0 < n ∧ n ≤ m) ((m - n) / n + 1) 0 + ite (0 < n ∧ n ≤ m) ((m - n) % n) m = m

tactic: cases h with
| isFalse h => simp [h]
| isTrue h =>
  simp [h]
  have ih := div_add_mod (m - n) n
  rw [Nat.left_distrib, Nat.mul_one, Nat.add_assoc, Nat.add_left_comm, ih, Nat.add_comm, Nat.sub_add_cancel h.2]
state_before: m n : Nat
h : Decidable (0 < n ∧ n ≤ m)
⊢ n * ite (0 < n ∧ n ≤ m) ((m - n) / n + 1) 0 + ite (0 < n ∧ n ≤ m) ((m - n) % n) m = m

tactic: simp [h]
state_before: case isFalse
m n : Nat
h : ¬(0 < n ∧ n ≤ m)
⊢ n * ite (0 < n ∧ n ≤ m) ((m - n) / n + 1) 0 + ite (0 < n ∧ n ≤ m) ((m - n) % n) m = m

tactic: simp [h]
state_before: case isTrue
m n : Nat
h : 0 < n ∧ n ≤ m
⊢ n * ite (0 < n ∧ n ≤ m) ((m - n) / n + 1) 0 + ite (0 < n ∧ n ≤ m) ((m - n) % n) m = m

tactic: have ih := div_add_mod (m - n) n
state_before: case isTrue
m n : Nat
h : 0 < n ∧ n ≤ m
⊢ n * ((m - n) / n + 1) + (m - n) % n = m

tactic: rw [Nat.left_distrib, Nat.mul_one, Nat.add_assoc, Nat.add_left_comm, ih, Nat.add_comm, Nat.sub_add_cancel h.2]
state_before: case isTrue
m n : Nat
h : 0 < n ∧ n ≤ m
ih : n * ((m - n) / n) + (m - n) % n = m - n
⊢ n * ((m - n) / n + 1) + (m - n) % n = m

tactic: apply div_rec_lemma
state_before: m n : Nat
a✝ : failed to pretty print expression (use 'set_option pp.rawOnError true' for raw representation)
h✝¹ : Decidable (0 < n ∧ n ≤ m)
h : 0 < n ∧ n ≤ m
h✝ : h✝¹ = isTrue h
⊢ (invImage (fun a => PSigma.casesOn a fun x snd => sizeOf x) instWellFoundedRelation).1 { fst := m - n, snd := n }
    { fst := m, snd := n }

tactic: assumption
state_before: case a
m n : Nat
a✝ : failed to pretty print expression (use 'set_option pp.rawOnError true' for raw representation)
h✝¹ : Decidable (0 < n ∧ n ≤ m)
h : 0 < n ∧ n ≤ m
h✝ : h✝¹ = isTrue h
⊢ 0 < n ∧ n ≤ m
Theorem: Real.cos_neg_of_pi_div_two_lt_of_lt
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: linarith
state_before: x : ℝ
hx₁ : π / 2 < x
hx₂ : x < π + π / 2
⊢ -(π / 2) < π - x

tactic: linarith
state_before: x : ℝ
hx₁ : π / 2 < x
hx₂ : x < π + π / 2
⊢ π - x < π / 2
Theorem: Finset.card_eq_sum_ones
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: rw [sum_const, smul_eq_mul, mul_one]
state_before: ι : Type ?u.816906
β : Type u
α : Type v
γ : Type w
s✝ s₁ s₂ : Finset α
a : α
f g : α → β
s : Finset α
⊢ card s = ∑ x in s, 1
Theorem: Finset.disjSups_right_comm
File: Mathlib/Data/Finset/Sups.lean

tactic: simp_rw [disjSups_assoc, disjSups_comm]
state_before: α : Type u_1
inst✝³ : DecidableEq α
inst✝² : DistribLattice α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s t u v : Finset α
⊢ s ○ t ○ u = s ○ u ○ t
Theorem: SignType.nonpos_iff_ne_one
File: Mathlib/Data/Sign.lean

tactic: cases a <;> decide
state_before: a : SignType
⊢ a ≤ 0 ↔ a ≠ 1
Theorem: CategoryTheory.Limits.MonoCoprod.mk'
File: Mathlib/CategoryTheory/Limits/MonoCoprod.lean

tactic: obtain ⟨c, hc₁, hc₂⟩ := h A B
state_before: C : Type u_1
inst✝ : Category C
h : ∀ (A B : C), ∃ c x, Mono (BinaryCofan.inl c)
A B : C
c' : BinaryCofan A B
hc' : IsColimit c'
⊢ Mono (BinaryCofan.inl c')

tactic: simpa only [mono_inl_iff hc' hc₁] using hc₂
state_before: case intro.intro
C : Type u_1
inst✝ : Category C
h : ∀ (A B : C), ∃ c x, Mono (BinaryCofan.inl c)
A B : C
c' : BinaryCofan A B
hc' : IsColimit c'
c : BinaryCofan A B
hc₁ : IsColimit c
hc₂ : Mono (BinaryCofan.inl c)
⊢ Mono (BinaryCofan.inl c')
Theorem: EReal.nhds_bot_basis
File: Mathlib/Topology/Instances/EReal.lean

tactic: refine nhds_bot_basis.to_hasBasis (fun x hx => ?_) fun _ _ ↦ ⟨_, bot_lt_coe _, Subset.rfl⟩
state_before: α : Type ?u.14563
inst✝ : TopologicalSpace α
⊢ HasBasis (𝓝 ⊥) (fun x => True) fun x => Iio ↑x

tactic: rcases exists_rat_btwn_of_lt hx with ⟨y, -, hxy⟩
state_before: α : Type ?u.14563
inst✝ : TopologicalSpace α
x : EReal
hx : ⊥ < x
⊢ ∃ i', True ∧ Iio ↑i' ⊆ Iio x

tactic: exact ⟨_, trivial, Iio_subset_Iio hxy.le⟩
state_before: case intro.intro
α : Type ?u.14563
inst✝ : TopologicalSpace α
x : EReal
hx : ⊥ < x
y : ℚ
hxy : ↑↑y < x
⊢ ∃ i', True ∧ Iio ↑i' ⊆ Iio x
Theorem: Metric.cthickening_eq_iInter_cthickening
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: apply cthickening_eq_iInter_cthickening' (Ioi δ) rfl.subset
state_before: ι : Sort ?u.141178
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ✝ ε : ℝ
s t : Set α
x : α
δ : ℝ
E : Set α
⊢ cthickening δ E = ⋂ (ε : ℝ) (_ : δ < ε), cthickening ε E

tactic: simp_rw [inter_eq_right_iff_subset.mpr Ioc_subset_Ioi_self]
state_before: case hs
ι : Sort ?u.141178
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ✝ ε : ℝ
s t : Set α
x : α
δ : ℝ
E : Set α
⊢ ∀ (ε : ℝ), δ < ε → Set.Nonempty (Ioi δ ∩ Ioc δ ε)

tactic: exact fun _ hε => nonempty_Ioc.mpr hε
state_before: case hs
ι : Sort ?u.141178
α : Type u
β : Type v
inst✝ : PseudoEMetricSpace α
δ✝ ε : ℝ
s t : Set α
x : α
δ : ℝ
E : Set α
⊢ ∀ (ε : ℝ), δ < ε → Set.Nonempty (Ioc δ ε)
Theorem: intervalIntegral.integral_mono_ae_restrict
File: Mathlib/MeasureTheory/Integral/IntervalIntegral.lean

tactic: let H := h.filter_mono <| ae_mono <| Measure.restrict_mono Ioc_subset_Icc_self <| le_refl μ
state_before: ι : Type ?u.20977613
𝕜 : Type ?u.20977616
E : Type ?u.20977619
F : Type ?u.20977622
A : Type ?u.20977625
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f g : ℝ → ℝ
a b : ℝ
μ : MeasureTheory.Measure ℝ
hab : a ≤ b
hf : IntervalIntegrable f μ a b
hg : IntervalIntegrable g μ a b
h : f ≤ᵐ[Measure.restrict μ (Icc a b)] g
⊢ (∫ (u : ℝ) in a..b, f u ∂μ) ≤ ∫ (u : ℝ) in a..b, g u ∂μ

tactic: simpa only [integral_of_le hab] using set_integral_mono_ae_restrict hf.1 hg.1 H
state_before: ι : Type ?u.20977613
𝕜 : Type ?u.20977616
E : Type ?u.20977619
F : Type ?u.20977622
A : Type ?u.20977625
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
f g : ℝ → ℝ
a b : ℝ
μ : MeasureTheory.Measure ℝ
hab : a ≤ b
hf : IntervalIntegrable f μ a b
hg : IntervalIntegrable g μ a b
h : f ≤ᵐ[Measure.restrict μ (Icc a b)] g
H : ∀ᵐ (x : ℝ) ∂Measure.restrict μ (Ioc a b), f x ≤ g x :=
  Eventually.filter_mono (ae_mono (Measure.restrict_mono Ioc_subset_Icc_self (le_refl μ))) h
⊢ (∫ (u : ℝ) in a..b, f u ∂μ) ≤ ∫ (u : ℝ) in a..b, g u ∂μ
Theorem: Subsemigroup.iSup_induction'
File: Mathlib/GroupTheory/Subsemigroup/Membership.lean

tactic: refine Exists.elim ?_ fun (hx₁' : x₁ ∈ ⨆ i, S i) (hc : C x₁ hx₁') => hc
state_before: ι : Sort u_2
M : Type u_1
A : Type ?u.9929
B : Type ?u.9932
inst✝ : Mul M
S : ι → Subsemigroup M
C : (x : M) → (x ∈ ⨆ (i : ι), S i) → Prop
hp : ∀ (i : ι) (x : M) (hxS : x ∈ S i), C x (_ : x ∈ ⨆ (i : ι), S i)
hmul :
  ∀ (x y : M) (hx : x ∈ ⨆ (i : ι), S i) (hy : y ∈ ⨆ (i : ι), S i),
    C x hx → C y hy → C (x * y) (_ : x * y ∈ ⨆ (i : ι), S i)
x₁ : M
hx₁ : x₁ ∈ ⨆ (i : ι), S i
⊢ C x₁ hx₁

tactic: refine @iSup_induction _ _ _ S (fun x' => ∃ hx'', C x' hx'') _ hx₁
    (fun i x₂ hx₂ => ?_) fun x₃ y => ?_
state_before: ι : Sort u_2
M : Type u_1
A : Type ?u.9929
B : Type ?u.9932
inst✝ : Mul M
S : ι → Subsemigroup M
C : (x : M) → (x ∈ ⨆ (i : ι), S i) → Prop
hp : ∀ (i : ι) (x : M) (hxS : x ∈ S i), C x (_ : x ∈ ⨆ (i : ι), S i)
hmul :
  ∀ (x y : M) (hx : x ∈ ⨆ (i : ι), S i) (hy : y ∈ ⨆ (i : ι), S i),
    C x hx → C y hy → C (x * y) (_ : x * y ∈ ⨆ (i : ι), S i)
x₁ : M
hx₁ : x₁ ∈ ⨆ (i : ι), S i
⊢ ∃ x, C x₁ x

tactic: exact ⟨_, hp _ _ hx₂⟩
state_before: case refine_1
ι : Sort u_2
M : Type u_1
A : Type ?u.9929
B : Type ?u.9932
inst✝ : Mul M
S : ι → Subsemigroup M
C : (x : M) → (x ∈ ⨆ (i : ι), S i) → Prop
hp : ∀ (i : ι) (x : M) (hxS : x ∈ S i), C x (_ : x ∈ ⨆ (i : ι), S i)
hmul :
  ∀ (x y : M) (hx : x ∈ ⨆ (i : ι), S i) (hy : y ∈ ⨆ (i : ι), S i),
    C x hx → C y hy → C (x * y) (_ : x * y ∈ ⨆ (i : ι), S i)
x₁ : M
hx₁ : x₁ ∈ ⨆ (i : ι), S i
i : ι
x₂ : M
hx₂ : x₂ ∈ S i
⊢ (fun x' => ∃ hx'', C x' hx'') x₂

tactic: rintro ⟨_, Cx⟩ ⟨_, Cy⟩
state_before: case refine_2
ι : Sort u_2
M : Type u_1
A : Type ?u.9929
B : Type ?u.9932
inst✝ : Mul M
S : ι → Subsemigroup M
C : (x : M) → (x ∈ ⨆ (i : ι), S i) → Prop
hp : ∀ (i : ι) (x : M) (hxS : x ∈ S i), C x (_ : x ∈ ⨆ (i : ι), S i)
hmul :
  ∀ (x y : M) (hx : x ∈ ⨆ (i : ι), S i) (hy : y ∈ ⨆ (i : ι), S i),
    C x hx → C y hy → C (x * y) (_ : x * y ∈ ⨆ (i : ι), S i)
x₁ : M
hx₁ : x₁ ∈ ⨆ (i : ι), S i
x₃ y : M
⊢ (fun x' => ∃ hx'', C x' hx'') x₃ → (fun x' => ∃ hx'', C x' hx'') y → (fun x' => ∃ hx'', C x' hx'') (x₃ * y)

tactic: exact ⟨_, hmul _ _ _ _ Cx Cy⟩
state_before: case refine_2.intro.intro
ι : Sort u_2
M : Type u_1
A : Type ?u.9929
B : Type ?u.9932
inst✝ : Mul M
S : ι → Subsemigroup M
C : (x : M) → (x ∈ ⨆ (i : ι), S i) → Prop
hp : ∀ (i : ι) (x : M) (hxS : x ∈ S i), C x (_ : x ∈ ⨆ (i : ι), S i)
hmul :
  ∀ (x y : M) (hx : x ∈ ⨆ (i : ι), S i) (hy : y ∈ ⨆ (i : ι), S i),
    C x hx → C y hy → C (x * y) (_ : x * y ∈ ⨆ (i : ι), S i)
x₁ : M
hx₁ : x₁ ∈ ⨆ (i : ι), S i
x₃ y : M
w✝¹ : x₃ ∈ ⨆ (i : ι), S i
Cx : C x₃ w✝¹
w✝ : y ∈ ⨆ (i : ι), S i
Cy : C y w✝
⊢ ∃ hx'', C (x₃ * y) hx''
Theorem: Finset.MulEtransform.card
File: Mathlib/Combinatorics/Additive/Etransform.lean

tactic: rw [add_add_add_comm, mulEtransformLeft.card, mulEtransformRight.card, ← mul_add, two_mul]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Group α
e : α
x : Finset α × Finset α
⊢ card (mulEtransformLeft e x).fst + card (mulEtransformLeft e x).snd +
      (card (mulEtransformRight e x).fst + card (mulEtransformRight e x).snd) =
    card x.fst + card x.snd + (card x.fst + card x.snd)
Theorem: WittVector.teichmuller_mul_aux₂
File: Mathlib/RingTheory/WittVector/Teichmuller.lean

tactic: refine' map_injective (MvPolynomial.map (Int.castRingHom ℚ))
  (MvPolynomial.map_injective _ Int.cast_injective) _
state_before: p : ℕ
R : Type u_1
S : Type ?u.90078
hp : Fact (Nat.Prime p)
inst✝¹ : CommRing R
inst✝ : CommRing S
x y : MvPolynomial R ℤ
⊢ teichmullerFun p (x * y) = teichmullerFun p x * teichmullerFun p y

tactic: simp only [teichmuller_mul_aux₁, map_teichmullerFun, RingHom.map_mul]
state_before: p : ℕ
R : Type u_1
S : Type ?u.90078
hp : Fact (Nat.Prime p)
inst✝¹ : CommRing R
inst✝ : CommRing S
x y : MvPolynomial R ℤ
⊢ ↑(map (MvPolynomial.map (Int.castRingHom ℚ))) (teichmullerFun p (x * y)) =
    ↑(map (MvPolynomial.map (Int.castRingHom ℚ))) (teichmullerFun p x * teichmullerFun p y)
Theorem: Multiset.support_sum_subset
File: Mathlib/Data/Finsupp/BigOperators.lean

tactic: induction s using Quot.inductionOn
state_before: ι : Type u_2
M : Type u_1
inst✝¹ : DecidableEq ι
inst✝ : AddCommMonoid M
s : Multiset (ι →₀ M)
⊢ (sum s).support ⊆ sup (map Finsupp.support s)

tactic: simpa only [Multiset.quot_mk_to_coe'', Multiset.coe_sum, Multiset.coe_map, Multiset.sup_coe,
  List.foldr_map] using List.support_sum_subset _
state_before: case h
ι : Type u_2
M : Type u_1
inst✝¹ : DecidableEq ι
inst✝ : AddCommMonoid M
a✝ : List (ι →₀ M)
⊢ (sum (Quot.mk Setoid.r a✝)).support ⊆ sup (map Finsupp.support (Quot.mk Setoid.r a✝))
Theorem: real_inner_add_sub_eq_zero_iff
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: conv_rhs => rw [← mul_self_inj_of_nonneg (norm_nonneg _) (norm_nonneg _)]
state_before: 𝕜 : Type ?u.3117342
E : Type ?u.3117345
F : Type u_1
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : F
⊢ inner (x + y) (x - y) = 0 ↔ ‖x‖ = ‖y‖

tactic: simp only [← @inner_self_eq_norm_mul_norm ℝ, inner_add_left, inner_sub_right, real_inner_comm y x,
  sub_eq_zero, re_to_real]
state_before: 𝕜 : Type ?u.3117342
E : Type ?u.3117345
F : Type u_1
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : F
⊢ inner (x + y) (x - y) = 0 ↔ ‖x‖ * ‖x‖ = ‖y‖ * ‖y‖

tactic: constructor
state_before: 𝕜 : Type ?u.3117342
E : Type ?u.3117345
F : Type u_1
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : F
⊢ inner x x + inner y x = inner y x + inner y y ↔ inner x x = inner y y

tactic: intro h
state_before: case mp
𝕜 : Type ?u.3117342
E : Type ?u.3117345
F : Type u_1
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : F
⊢ inner x x + inner y x = inner y x + inner y y → inner x x = inner y y

tactic: rw [add_comm] at h
state_before: case mp
𝕜 : Type ?u.3117342
E : Type ?u.3117345
F : Type u_1
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : F
h : inner x x + inner y x = inner y x + inner y y
⊢ inner x x = inner y y

tactic: linarith
state_before: case mp
𝕜 : Type ?u.3117342
E : Type ?u.3117345
F : Type u_1
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : F
h : inner y x + inner x x = inner y x + inner y y
⊢ inner x x = inner y y

tactic: intro h
state_before: case mpr
𝕜 : Type ?u.3117342
E : Type ?u.3117345
F : Type u_1
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : F
⊢ inner x x = inner y y → inner x x + inner y x = inner y x + inner y y

tactic: linarith
state_before: case mpr
𝕜 : Type ?u.3117342
E : Type ?u.3117345
F : Type u_1
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : F
h : inner x x = inner y y
⊢ inner x x + inner y x = inner y x + inner y y
Theorem: PowerSeries.trunc_C
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: rw [coeff_trunc, coeff_C, Polynomial.coeff_C]
state_before: R : Type u_1
inst✝ : CommSemiring R
n : ℕ
a : R
m : ℕ
⊢ Polynomial.coeff (trunc (n + 1) (↑(C R) a)) m = Polynomial.coeff (↑Polynomial.C a) m

tactic: split_ifs with H <;> first |rfl|try simp_all
state_before: R : Type u_1
inst✝ : CommSemiring R
n : ℕ
a : R
m : ℕ
⊢ (if m < n + 1 then if m = 0 then a else 0 else 0) = if m = 0 then a else 0

tactic: rfl
state_before: case inr.inr
R : Type u_1
inst✝ : CommSemiring R
n : ℕ
a : R
m : ℕ
H : ¬m < n + 1
h✝ : ¬m = 0
⊢ 0 = 0

tactic: try simp_all
state_before: case inr.inl
R : Type u_1
inst✝ : CommSemiring R
n : ℕ
a : R
m : ℕ
H : ¬m < n + 1
h✝ : m = 0
⊢ 0 = a

tactic: simp_all
state_before: case inr.inl
R : Type u_1
inst✝ : CommSemiring R
n : ℕ
a : R
m : ℕ
H : ¬m < n + 1
h✝ : m = 0
⊢ 0 = a
Theorem: IsROrC.abs_re_div_norm_le_one
File: Mathlib/Data/IsROrC/Basic.lean

tactic: rw [abs_div, abs_norm]
state_before: K : Type u_1
E : Type ?u.6892273
inst✝ : IsROrC K
z : K
⊢ abs (↑re z / ‖z‖) ≤ 1

tactic: exact div_le_one_of_le (abs_re_le_norm _) (norm_nonneg _)
state_before: K : Type u_1
E : Type ?u.6892273
inst✝ : IsROrC K
z : K
⊢ abs (↑re z) / ‖z‖ ≤ 1
Theorem: Nat.rfindOpt_mono
File: Mathlib/Computability/Partrec.lean

tactic: have h' := rfindOpt_dom.2 ⟨_, _, h⟩
state_before: α : Type u_1
f : ℕ → Option α
H : ∀ {a : α} {m n : ℕ}, m ≤ n → a ∈ f m → a ∈ f n
a : α
x✝ : ∃ n, a ∈ f n
n : ℕ
h : a ∈ f n
⊢ a ∈ rfindOpt f

tactic: cases' rfindOpt_spec ⟨h', rfl⟩ with k hk
state_before: α : Type u_1
f : ℕ → Option α
H : ∀ {a : α} {m n : ℕ}, m ≤ n → a ∈ f m → a ∈ f n
a : α
x✝ : ∃ n, a ∈ f n
n : ℕ
h : a ∈ f n
h' : (rfindOpt f).Dom
⊢ a ∈ rfindOpt f

tactic: have := (H (le_max_left _ _) h).symm.trans (H (le_max_right _ _) hk)
state_before: case intro
α : Type u_1
f : ℕ → Option α
H : ∀ {a : α} {m n : ℕ}, m ≤ n → a ∈ f m → a ∈ f n
a : α
x✝ : ∃ n, a ∈ f n
n : ℕ
h : a ∈ f n
h' : (rfindOpt f).Dom
k : ℕ
hk : Part.get (rfindOpt f) h' ∈ f k
⊢ a ∈ rfindOpt f

tactic: simp at this
state_before: case intro
α : Type u_1
f : ℕ → Option α
H : ∀ {a : α} {m n : ℕ}, m ≤ n → a ∈ f m → a ∈ f n
a : α
x✝ : ∃ n, a ∈ f n
n : ℕ
h : a ∈ f n
h' : (rfindOpt f).Dom
k : ℕ
hk : Part.get (rfindOpt f) h' ∈ f k
this : Option.some a = Option.some (Part.get (rfindOpt f) h')
⊢ a ∈ rfindOpt f

tactic: simp [this, get_mem]
state_before: case intro
α : Type u_1
f : ℕ → Option α
H : ∀ {a : α} {m n : ℕ}, m ≤ n → a ∈ f m → a ∈ f n
a : α
x✝ : ∃ n, a ∈ f n
n : ℕ
h : a ∈ f n
h' : (rfindOpt f).Dom
k : ℕ
hk : Part.get (rfindOpt f) h' ∈ f k
this : a = Part.get (rfindOpt f) h'
⊢ a ∈ rfindOpt f
Theorem: CategoryTheory.Limits.IsZero.of_iso
File: Mathlib/CategoryTheory/Limits/Shapes/ZeroObjects.lean

tactic: refine' ⟨fun Z => ⟨⟨⟨e.hom ≫ hY.to_ Z⟩, fun f => _⟩⟩,
  fun Z => ⟨⟨⟨hY.from_ Z ≫ e.inv⟩, fun f => _⟩⟩⟩
state_before: C : Type u
inst✝¹ : Category C
D : Type u'
inst✝ : Category D
X Y : C
hY : IsZero Y
e : X ≅ Y
⊢ IsZero X

tactic: rw [← cancel_epi e.inv]
state_before: case refine'_1
C : Type u
inst✝¹ : Category C
D : Type u'
inst✝ : Category D
X Y : C
hY : IsZero Y
e : X ≅ Y
Z : C
f : X ⟶ Z
⊢ f = default

tactic: apply hY.eq_of_src
state_before: case refine'_1
C : Type u
inst✝¹ : Category C
D : Type u'
inst✝ : Category D
X Y : C
hY : IsZero Y
e : X ≅ Y
Z : C
f : X ⟶ Z
⊢ e.inv ≫ f = e.inv ≫ default

tactic: rw [← cancel_mono e.hom]
state_before: case refine'_2
C : Type u
inst✝¹ : Category C
D : Type u'
inst✝ : Category D
X Y : C
hY : IsZero Y
e : X ≅ Y
Z : C
f : Z ⟶ X
⊢ f = default

tactic: apply hY.eq_of_tgt
state_before: case refine'_2
C : Type u
inst✝¹ : Category C
D : Type u'
inst✝ : Category D
X Y : C
hY : IsZero Y
e : X ≅ Y
Z : C
f : Z ⟶ X
⊢ f ≫ e.hom = default ≫ e.hom