1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: card_classGroup_eq_one
File: Mathlib/RingTheory/ClassGroup.lean

tactic: rw [Fintype.card_eq_one_iff]
state_before: R : Type u_1
K : Type u_2
L : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Field K
inst✝⁹ : Field L
inst✝⁸ : DecidableEq L
inst✝⁷ : Algebra R K
inst✝⁶ : IsFractionRing R K
inst✝⁵ : Algebra K L
inst✝⁴ : FiniteDimensional K L
inst✝³ : Algebra R L
inst✝² : IsScalarTower R K L
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
⊢ Fintype.card (ClassGroup R) = 1
state_after: R : Type u_1
K : Type u_2
L : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Field K
inst✝⁹ : Field L
inst✝⁸ : DecidableEq L
inst✝⁷ : Algebra R K
inst✝⁶ : IsFractionRing R K
inst✝⁵ : Algebra K L
inst✝⁴ : FiniteDimensional K L
inst✝³ : Algebra R L
inst✝² : IsScalarTower R K L
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
⊢ ∃ x, ∀ (y : ClassGroup R), y = x

tactic: use 1
state_before: R : Type u_1
K : Type u_2
L : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Field K
inst✝⁹ : Field L
inst✝⁸ : DecidableEq L
inst✝⁷ : Algebra R K
inst✝⁶ : IsFractionRing R K
inst✝⁵ : Algebra K L
inst✝⁴ : FiniteDimensional K L
inst✝³ : Algebra R L
inst✝² : IsScalarTower R K L
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
⊢ ∃ x, ∀ (y : ClassGroup R), y = x
state_after: case h
R : Type u_1
K : Type u_2
L : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Field K
inst✝⁹ : Field L
inst✝⁸ : DecidableEq L
inst✝⁷ : Algebra R K
inst✝⁶ : IsFractionRing R K
inst✝⁵ : Algebra K L
inst✝⁴ : FiniteDimensional K L
inst✝³ : Algebra R L
inst✝² : IsScalarTower R K L
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
⊢ ∀ (y : ClassGroup R), y = 1

tactic: refine ClassGroup.induction (R := R) (FractionRing R) (fun I => ?_)
state_before: case h
R : Type u_1
K : Type u_2
L : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Field K
inst✝⁹ : Field L
inst✝⁸ : DecidableEq L
inst✝⁷ : Algebra R K
inst✝⁶ : IsFractionRing R K
inst✝⁵ : Algebra K L
inst✝⁴ : FiniteDimensional K L
inst✝³ : Algebra R L
inst✝² : IsScalarTower R K L
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
⊢ ∀ (y : ClassGroup R), y = 1
state_after: case h
R : Type u_1
K : Type u_2
L : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Field K
inst✝⁹ : Field L
inst✝⁸ : DecidableEq L
inst✝⁷ : Algebra R K
inst✝⁶ : IsFractionRing R K
inst✝⁵ : Algebra K L
inst✝⁴ : FiniteDimensional K L
inst✝³ : Algebra R L
inst✝² : IsScalarTower R K L
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
I : (FractionalIdeal R⁰ (FractionRing R))ˣ
⊢ ClassGroup.mk I = 1

tactic: exact ClassGroup.mk_eq_one_iff.mpr (I : FractionalIdeal R⁰ (FractionRing R)).isPrincipal
state_before: case h
R : Type u_1
K : Type u_2
L : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Field K
inst✝⁹ : Field L
inst✝⁸ : DecidableEq L
inst✝⁷ : Algebra R K
inst✝⁶ : IsFractionRing R K
inst✝⁵ : Algebra K L
inst✝⁴ : FiniteDimensional K L
inst✝³ : Algebra R L
inst✝² : IsScalarTower R K L
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
I : (FractionalIdeal R⁰ (FractionRing R))ˣ
⊢ ClassGroup.mk I = 1
state_after: no goals
Theorem: eVariationOn.nonempty_monotone_mem
File: Mathlib/Analysis/BoundedVariation.lean

tactic: obtain ⟨x, hx⟩ := hs
state_before: α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
s : Set α
hs : s.Nonempty
⊢ Nonempty { u // Monotone u ∧ ∀ (i : ℕ), u i ∈ s }
state_after: case intro
α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
s : Set α
x : α
hx : x ∈ s
⊢ Nonempty { u // Monotone u ∧ ∀ (i : ℕ), u i ∈ s }

tactic: exact ⟨⟨fun _ => x, fun i j _ => le_rfl, fun _ => hx⟩⟩
state_before: case intro
α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
s : Set α
x : α
hx : x ∈ s
⊢ Nonempty { u // Monotone u ∧ ∀ (i : ℕ), u i ∈ s }
state_after: no goals
Theorem: List.nil_union
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: simp [List.union_def, foldr]
state_before: α : Type u_1
inst✝ : BEq α
l : List α
⊢ [] ∪ l = l
state_after: no goals
Theorem: Set.exists_mem_insert
File: Mathlib/Data/Set/Basic.lean

tactic: simp [mem_insert_iff, or_and_right, exists_and_left, exists_or]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a✝ b : α
s✝ s₁ s₂ t t₁ t₂ u : Set α
P : α → Prop
a : α
s : Set α
⊢ (∃ x ∈ insert a s, P x) ↔ P a ∨ ∃ x ∈ s, P x
state_after: no goals
Theorem: Finset.card_image₂_singleton_left
File: Mathlib/Data/Finset/NAry.lean

tactic: rw [image₂_singleton_left, card_image_of_injective _ hf]
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
ζ : Type u_11
ζ' : Type u_12
ν : Type u_13
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f f' : α → β → γ
g g' : α → β → γ → δ
s s' : Finset α
t t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
hf : Injective (f a)
⊢ (image₂ f {a} t).card = t.card
state_after: no goals
Theorem: RelSeries.length_eq_zero
File: Mathlib/Order/RelSeries.lean

tactic: rw [← not_ne_iff, length_ne_zero irrefl, Set.not_nontrivial_iff]
state_before: α : Type u_1
r : Rel α α
β : Type u_2
s✝ : Rel β β
s : RelSeries r
x : α
irrefl : Irreflexive r
⊢ s.length = 0 ↔ {x | x ∈ s}.Subsingleton
state_after: no goals
Theorem: CategoryTheory.Subobject.bot_eq_zero
File: Mathlib/CategoryTheory/Subobject/Lattice.lean

tactic: simp [eq_iff_true_of_subsingleton]
state_before: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
X Y Z : C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroObject C
inst✝ : HasZeroMorphisms C
B : C
⊢ (initialIsInitial.uniqueUpToIso HasZeroObject.zeroIsInitial).hom ≫ 0 = initial.to B
state_after: no goals
Theorem: AddCommGroup.nsmul_add_modEq
File: Mathlib/Algebra/ModEq.lean

tactic: simp [← sub_sub]
state_before: α : Type u_1
inst✝ : AddCommGroup α
p a a₁ a₂ b b₁ b₂ c : α
n✝ : ℕ
z : ℤ
n : ℕ
⊢ a - (n • p + a) = -↑n • p
state_after: no goals
Theorem: isConj_iff₀
File: Mathlib/Algebra/GroupWithZero/Conj.lean

tactic: congr! 2 with c
state_before: α : Type u_1
inst✝ : GroupWithZero α
a b : α
⊢ (∃ x, x ≠ 0 ∧ SemiconjBy x a b) ↔ ∃ c, c ≠ 0 ∧ c * a * c⁻¹ = b
state_after: case a.h.e'_2.h.a
α : Type u_1
inst✝ : GroupWithZero α
a b c : α
⊢ c ≠ 0 ∧ SemiconjBy c a b ↔ c ≠ 0 ∧ c * a * c⁻¹ = b
Theorem: IsRelPrime.of_dvd_left
File: Mathlib/Algebra/Divisibility/Units.lean

tactic: obtain ⟨d, rfl⟩ := dvd
state_before: α : Type u_1
inst✝ : CommMonoid α
x y z : α
h : IsRelPrime y z
dvd : x ∣ y
⊢ IsRelPrime x z
state_after: case intro
α : Type u_1
inst✝ : CommMonoid α
x z d : α
h : IsRelPrime (x * d) z
⊢ IsRelPrime x z

tactic: exact IsRelPrime.of_mul_left_left h
state_before: case intro
α : Type u_1
inst✝ : CommMonoid α
x z d : α
h : IsRelPrime (x * d) z
⊢ IsRelPrime x z
state_after: no goals
Theorem: Grp.SurjectiveOfEpiAuxs.g_ne_h
File: Mathlib/Algebra/Category/Grp/EpiMono.lean

tactic: intro r
state_before: A B : Grp
f : A ⟶ B
x : ↑B
hx : x ∉ MonoidHom.range f
⊢ g ≠ h
state_after: A B : Grp
f : A ⟶ B
x : ↑B
hx : x ∉ MonoidHom.range f
r : g = h
⊢ False

tactic: replace r :=
  DFunLike.congr_fun (DFunLike.congr_fun r x) (fromCoset ⟨f.range, ⟨1, one_leftCoset _⟩⟩)
state_before: A B : Grp
f : A ⟶ B
x : ↑B
hx : x ∉ MonoidHom.range f
r : g = h
⊢ False
state_after: A B : Grp
f : A ⟶ B
x : ↑B
hx : x ∉ MonoidHom.range f
r : (g x) (fromCoset ⟨↑(MonoidHom.range f), ⋯⟩) = (h x) (fromCoset ⟨↑(MonoidHom.range f), ⋯⟩)
⊢ False

tactic: change _ = ((τ).symm.trans (g x)).trans τ _ at r
state_before: A B : Grp
f : A ⟶ B
x : ↑B
hx : x ∉ MonoidHom.range f
r : (g x) (fromCoset ⟨↑(MonoidHom.range f), ⋯⟩) = (h x) (fromCoset ⟨↑(MonoidHom.range f), ⋯⟩)
⊢ False
state_after: A B : Grp
f : A ⟶ B
x : ↑B
hx : x ∉ MonoidHom.range f
r :
  (g x) (fromCoset ⟨↑(MonoidHom.range f), ⋯⟩) =
    (((Equiv.symm τ).trans (g x)).trans τ) (fromCoset ⟨↑(MonoidHom.range f), ⋯⟩)
⊢ False

tactic: rw [g_apply_fromCoset, MonoidHom.coe_mk] at r
state_before: A B : Grp
f : A ⟶ B
x : ↑B
hx : x ∉ MonoidHom.range f
r :
  (g x) (fromCoset ⟨↑(MonoidHom.range f), ⋯⟩) =
    (((Equiv.symm τ).trans (g x)).trans τ) (fromCoset ⟨↑(MonoidHom.range f), ⋯⟩)
⊢ False
state_after: A B : Grp
f : A ⟶ B
x : ↑B
hx : x ∉ MonoidHom.range f
r :
  fromCoset ⟨x • ↑⟨↑(MonoidHom.range f), ⋯⟩, ⋯⟩ =
    (((Equiv.symm τ).trans (↑g x)).trans τ) (fromCoset ⟨↑(MonoidHom.range f), ⋯⟩)
⊢ False

tactic: simp only [MonoidHom.coe_range, Subtype.coe_mk, Equiv.symm_swap, Equiv.toFun_as_coe,
  Equiv.coe_trans, Function.comp_apply] at r
state_before: A B : Grp
f : A ⟶ B
x : ↑B
hx : x ∉ MonoidHom.range f
r :
  fromCoset ⟨x • ↑⟨↑(MonoidHom.range f), ⋯⟩, ⋯⟩ =
    (((Equiv.symm τ).trans (↑g x)).trans τ) (fromCoset ⟨↑(MonoidHom.range f), ⋯⟩)
⊢ False
state_after: A B : Grp
f : A ⟶ B
x : ↑B
hx : x ∉ MonoidHom.range f
r : fromCoset ⟨x • Set.range ⇑f, ⋯⟩ = τ ((↑g x) ((Equiv.symm τ) (fromCoset ⟨Set.range ⇑f, ⋯⟩)))
⊢ False

tactic: erw [Equiv.swap_apply_left, g_apply_infinity, Equiv.swap_apply_right] at r
state_before: A B : Grp
f : A ⟶ B
x : ↑B
hx : x ∉ MonoidHom.range f
r : fromCoset ⟨x • Set.range ⇑f, ⋯⟩ = τ ((↑g x) ((Equiv.symm τ) (fromCoset ⟨Set.range ⇑f, ⋯⟩)))
⊢ False
state_after: A B : Grp
f : A ⟶ B
x : ↑B
hx : x ∉ MonoidHom.range f
r : fromCoset ⟨x • Set.range ⇑f, ⋯⟩ = fromCoset ⟨↑(MonoidHom.range f), ⋯⟩
⊢ False

tactic: exact fromCoset_ne_of_nin_range _ hx r
state_before: A B : Grp
f : A ⟶ B
x : ↑B
hx : x ∉ MonoidHom.range f
r : fromCoset ⟨x • Set.range ⇑f, ⋯⟩ = fromCoset ⟨↑(MonoidHom.range f), ⋯⟩
⊢ False
state_after: no goals
Theorem: MeasureTheory.isProbabilityMeasure_map
File: Mathlib/MeasureTheory/Measure/Typeclasses.lean

tactic: simp [map_apply_of_aemeasurable, hf]
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s t : Set α
inst✝ : IsProbabilityMeasure μ
p : α → Prop
f✝ : β → α
f : α → β
hf : AEMeasurable f μ
⊢ (Measure.map f μ) univ = 1
state_after: no goals
Theorem: ProbabilityTheory.isMeasurableRatCDF_toRatCDF
File: Mathlib/Probability/Kernel/Disintegration/MeasurableStieltjes.lean

tactic: classical
exact IsRatStieltjesPoint.ite (IsRatStieltjesPoint f) id
  (fun _ ↦ isRatStieltjesPoint_defaultRatCDF a)
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
a : α
⊢ IsRatStieltjesPoint (toRatCDF f) a
state_after: no goals

tactic: exact IsRatStieltjesPoint.ite (IsRatStieltjesPoint f) id
  (fun _ ↦ isRatStieltjesPoint_defaultRatCDF a)
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : MeasurableSpace α
f : α → ℚ → ℝ
hf : Measurable f
a : α
⊢ IsRatStieltjesPoint (toRatCDF f) a
state_after: no goals
Theorem: HomologicalComplex₂.ι_totalShift₂Iso_hom_f
File: Mathlib/Algebra/Homology/TotalComplexShift.lean

tactic: dsimp
state_before: C : Type u_1
inst✝² : Category.{?u.234332, u_1} C
inst✝¹ : Preadditive C
K L : HomologicalComplex₂ C (up ℤ) (up ℤ)
f : K ⟶ L
x y : ℤ
inst✝ : K.HasTotal (up ℤ)
a b n : ℤ
h : a + b = n
b' : ℤ
hb' : b' = b + y
n' : ℤ
hn' : n' = n + y
⊢ (up ℤ).π (up ℤ) (up ℤ) (a, b') = n'
state_after: C : Type u_1
inst✝² : Category.{?u.234332, u_1} C
inst✝¹ : Preadditive C
K L : HomologicalComplex₂ C (up ℤ) (up ℤ)
f : K ⟶ L
x y : ℤ
inst✝ : K.HasTotal (up ℤ)
a b n : ℤ
h : a + b = n
b' : ℤ
hb' : b' = b + y
n' : ℤ
hn' : n' = n + y
⊢ a + b' = n'

tactic: omega
state_before: C : Type u_1
inst✝² : Category.{?u.234332, u_1} C
inst✝¹ : Preadditive C
K L : HomologicalComplex₂ C (up ℤ) (up ℤ)
f : K ⟶ L
x y : ℤ
inst✝ : K.HasTotal (up ℤ)
a b n : ℤ
h : a + b = n
b' : ℤ
hb' : b' = b + y
n' : ℤ
hn' : n' = n + y
⊢ a + b' = n'
state_after: no goals

tactic: subst hb' hn'
state_before: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
K L : HomologicalComplex₂ C (up ℤ) (up ℤ)
f : K ⟶ L
x y : ℤ
inst✝ : K.HasTotal (up ℤ)
a b n : ℤ
h : a + b = n
b' : ℤ
hb' : b' = b + y
n' : ℤ
hn' : n' = n + y
⊢ ((shiftFunctor₂ C y).obj K).ιTotal (up ℤ) a b n h ≫ (K.totalShift₂Iso y).hom.f n =
    (a * y).negOnePow •
      (K.shiftFunctor₂XXIso a b y b' hb').hom ≫
        K.ιTotal (up ℤ) a b' n' ⋯ ≫ (CochainComplex.shiftFunctorObjXIso (K.total (up ℤ)) y n n' hn').inv
state_after: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
K L : HomologicalComplex₂ C (up ℤ) (up ℤ)
f : K ⟶ L
x y : ℤ
inst✝ : K.HasTotal (up ℤ)
a b n : ℤ
h : a + b = n
⊢ ((shiftFunctor₂ C y).obj K).ιTotal (up ℤ) a b n h ≫ (K.totalShift₂Iso y).hom.f n =
    (a * y).negOnePow •
      (K.shiftFunctor₂XXIso a b y (b + y) ⋯).hom ≫
        K.ιTotal (up ℤ) a (b + y) (n + y) ⋯ ≫ (CochainComplex.shiftFunctorObjXIso (K.total (up ℤ)) y n (n + y) ⋯).inv

tactic: simp [totalShift₂Iso, totalShift₂XIso]
state_before: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
K L : HomologicalComplex₂ C (up ℤ) (up ℤ)
f : K ⟶ L
x y : ℤ
inst✝ : K.HasTotal (up ℤ)
a b n : ℤ
h : a + b = n
⊢ ((shiftFunctor₂ C y).obj K).ιTotal (up ℤ) a b n h ≫ (K.totalShift₂Iso y).hom.f n =
    (a * y).negOnePow •
      (K.shiftFunctor₂XXIso a b y (b + y) ⋯).hom ≫
        K.ιTotal (up ℤ) a (b + y) (n + y) ⋯ ≫ (CochainComplex.shiftFunctorObjXIso (K.total (up ℤ)) y n (n + y) ⋯).inv
state_after: no goals
Theorem: EReal.preimage_coe_Iic
File: Mathlib/Data/Real/EReal.lean

tactic: change (WithBot.some ∘ WithTop.some) ⁻¹' (Iic (WithBot.some (WithTop.some y))) = _
state_before: y : ℝ
⊢ Real.toEReal ⁻¹' Iic ↑y = Iic y
state_after: y : ℝ
⊢ WithBot.some ∘ WithTop.some ⁻¹' Iic ↑↑y = Iic y

tactic: refine preimage_comp.trans ?_
state_before: y : ℝ
⊢ WithBot.some ∘ WithTop.some ⁻¹' Iic ↑↑y = Iic y
state_after: y : ℝ
⊢ WithTop.some ⁻¹' (WithBot.some ⁻¹' Iic ↑↑y) = Iic y

tactic: simp only [WithBot.preimage_coe_Iic, WithTop.preimage_coe_Iic]
state_before: y : ℝ
⊢ WithTop.some ⁻¹' (WithBot.some ⁻¹' Iic ↑↑y) = Iic y
state_after: no goals
Theorem: OrderEmbedding.preimage_uIoc
File: Mathlib/Order/Interval/Set/OrderEmbedding.lean

tactic: cases le_total x y <;> simp [*]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
e : α ↪o β
x y : α
⊢ ⇑e ⁻¹' Ι (e x) (e y) = Ι x y
state_after: no goals
Theorem: Int.sq_add_sq_of_two_mul_sq_add_sq
File: Mathlib/NumberTheory/SumFourSquares.lean

tactic: simp [← h, even_mul]
state_before: m x y : ℤ
h : 2 * m = x ^ 2 + y ^ 2
⊢ Even (x ^ 2 + y ^ 2)
state_after: no goals

tactic: simpa [sq, parity_simps]
state_before: m x y : ℤ
h : 2 * m = x ^ 2 + y ^ 2
this : Even (x ^ 2 + y ^ 2)
⊢ Even (x + y)
state_after: no goals

tactic: simpa [sq, parity_simps]
state_before: m x y : ℤ
h : 2 * m = x ^ 2 + y ^ 2
this : Even (x ^ 2 + y ^ 2)
hxaddy : Even (x + y)
⊢ Even (x - y)
state_after: no goals

tactic: decide
state_before: m x y : ℤ
h : 2 * m = x ^ 2 + y ^ 2
this : Even (x ^ 2 + y ^ 2)
hxaddy : Even (x + y)
hxsuby : Even (x - y)
⊢ 2 * 2 ≠ 0
state_after: no goals

tactic: rw [mul_assoc, h]
state_before: m x y : ℤ
h : 2 * m = x ^ 2 + y ^ 2
this : Even (x ^ 2 + y ^ 2)
hxaddy : Even (x + y)
hxsuby : Even (x - y)
⊢ 2 * 2 * m = (x - y) ^ 2 + (x + y) ^ 2
state_after: m x y : ℤ
h : 2 * m = x ^ 2 + y ^ 2
this : Even (x ^ 2 + y ^ 2)
hxaddy : Even (x + y)
hxsuby : Even (x - y)
⊢ 2 * (x ^ 2 + y ^ 2) = (x - y) ^ 2 + (x + y) ^ 2

tactic: ring
state_before: m x y : ℤ
h : 2 * m = x ^ 2 + y ^ 2
this : Even (x ^ 2 + y ^ 2)
hxaddy : Even (x + y)
hxsuby : Even (x - y)
⊢ 2 * (x ^ 2 + y ^ 2) = (x - y) ^ 2 + (x + y) ^ 2
state_after: no goals

tactic: rw [even_iff_two_dvd] at hxsuby hxaddy
state_before: m x y : ℤ
h : 2 * m = x ^ 2 + y ^ 2
this : Even (x ^ 2 + y ^ 2)
hxaddy : Even (x + y)
hxsuby : Even (x - y)
⊢ (x - y) ^ 2 + (x + y) ^ 2 = (2 * ((x - y) / 2)) ^ 2 + (2 * ((x + y) / 2)) ^ 2
state_after: m x y : ℤ
h : 2 * m = x ^ 2 + y ^ 2
this : Even (x ^ 2 + y ^ 2)
hxaddy : 2 ∣ x + y
hxsuby : 2 ∣ x - y
⊢ (x - y) ^ 2 + (x + y) ^ 2 = (2 * ((x - y) / 2)) ^ 2 + (2 * ((x + y) / 2)) ^ 2

tactic: rw [Int.mul_ediv_cancel' hxsuby, Int.mul_ediv_cancel' hxaddy]
state_before: m x y : ℤ
h : 2 * m = x ^ 2 + y ^ 2
this : Even (x ^ 2 + y ^ 2)
hxaddy : 2 ∣ x + y
hxsuby : 2 ∣ x - y
⊢ (x - y) ^ 2 + (x + y) ^ 2 = (2 * ((x - y) / 2)) ^ 2 + (2 * ((x + y) / 2)) ^ 2
state_after: no goals

tactic: set_option simprocs false in
simp [mul_add, pow_succ, mul_comm, mul_assoc, mul_left_comm]
state_before: m x y : ℤ
h : 2 * m = x ^ 2 + y ^ 2
this : Even (x ^ 2 + y ^ 2)
hxaddy : Even (x + y)
hxsuby : Even (x - y)
⊢ (2 * ((x - y) / 2)) ^ 2 + (2 * ((x + y) / 2)) ^ 2 = 2 * 2 * (((x - y) / 2) ^ 2 + ((x + y) / 2) ^ 2)
state_after: no goals

tactic: simp [mul_add, pow_succ, mul_comm, mul_assoc, mul_left_comm]
state_before: m x y : ℤ
h : 2 * m = x ^ 2 + y ^ 2
this : Even (x ^ 2 + y ^ 2)
hxaddy : Even (x + y)
hxsuby : Even (x - y)
⊢ (2 * ((x - y) / 2)) ^ 2 + (2 * ((x + y) / 2)) ^ 2 = 2 * 2 * (((x - y) / 2) ^ 2 + ((x + y) / 2) ^ 2)
state_after: no goals
Theorem: Set.preimage_add_const_Ioc
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp [← Ioi_inter_Iic]
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ (fun x => x + a) ⁻¹' Ioc b c = Ioc (b - a) (c - a)
state_after: no goals
Theorem: Multiset.card_eq_countP_add_countP
File: Mathlib/Data/Multiset/Basic.lean

tactic: simp [l.length_eq_countP_add_countP p]
state_before: α : Type u_1
β : Type v
γ : Type u_2
p : α → Prop
inst✝ : DecidablePred p
s : Multiset α
l : List α
⊢ card (Quot.mk Setoid.r l) = countP p (Quot.mk Setoid.r l) + countP (fun x => ¬p x) (Quot.mk Setoid.r l)
state_after: no goals
Theorem: Orientation.cos_oangle_add_left_mul_norm_of_oangle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean

tactic: rw [← neg_inj, oangle_rev, ← oangle_neg_orientation_eq_neg, neg_inj] at h ⊢
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : o.oangle x y = ↑(π / 2)
⊢ (o.oangle (x + y) y).cos * ‖x + y‖ = ‖y‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : (-o).oangle y x = ↑(π / 2)
⊢ ((-o).oangle y (x + y)).cos * ‖x + y‖ = ‖y‖

tactic: rw [add_comm]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : (-o).oangle y x = ↑(π / 2)
⊢ ((-o).oangle y (x + y)).cos * ‖x + y‖ = ‖y‖
state_after: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : (-o).oangle y x = ↑(π / 2)
⊢ ((-o).oangle y (y + x)).cos * ‖y + x‖ = ‖y‖

tactic: exact (-o).cos_oangle_add_right_mul_norm_of_oangle_eq_pi_div_two h
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
hd2 : Fact (finrank ℝ V = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : (-o).oangle y x = ↑(π / 2)
⊢ ((-o).oangle y (y + x)).cos * ‖y + x‖ = ‖y‖
state_after: no goals
Theorem: CategoryTheory.ShortComplex.homologyι_comp_fromOpcycles
File: Mathlib/Algebra/Homology/ShortComplex/Homology.lean

tactic: dsimp only [homologyι]
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
A : C
inst✝ : S.HasHomology
⊢ S.homologyι ≫ S.fromOpcycles = 0
state_after: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
A : C
inst✝ : S.HasHomology
⊢ (S.rightHomologyIso.inv ≫ S.rightHomologyι) ≫ S.fromOpcycles = 0

tactic: simp only [assoc, rightHomologyι_comp_fromOpcycles, comp_zero]
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
A : C
inst✝ : S.HasHomology
⊢ (S.rightHomologyIso.inv ≫ S.rightHomologyι) ≫ S.fromOpcycles = 0
state_after: no goals
Theorem: CancelDenoms.add_subst
File: Mathlib/Tactic/CancelDenoms/Core.lean

tactic: simp [left_distrib, *]
state_before: α : Type u_1
inst✝ : Ring α
n e1 e2 t1 t2 : α
h1 : n * e1 = t1
h2 : n * e2 = t2
⊢ n * (e1 + e2) = t1 + t2
state_after: no goals
Theorem: AddLECancellable.lt_tsub_iff_left_of_le
File: Mathlib/Algebra/Order/Sub/Canonical.lean

tactic: rw [add_comm]
state_before: α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
hc : AddLECancellable c
h : c ≤ b
⊢ a < b - c ↔ c + a < b
state_after: α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
hc : AddLECancellable c
h : c ≤ b
⊢ a < b - c ↔ a + c < b

tactic: exact hc.lt_tsub_iff_right_of_le h
state_before: α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
hc : AddLECancellable c
h : c ≤ b
⊢ a < b - c ↔ a + c < b
state_after: no goals
Theorem: LinearMap.range_neg
File: Mathlib/Algebra/Module/Submodule/Range.lean

tactic: change range ((-LinearMap.id : M₂ →ₗ[R₂] M₂).comp f) = _
state_before: R✝ : Type u_1
R₂✝ : Type u_2
R₃ : Type u_3
K : Type u_4
K₂ : Type u_5
M✝ : Type u_6
M₂✝ : Type u_7
M₃ : Type u_8
V : Type u_9
V₂ : Type u_10
inst✝¹⁹ : Semiring R✝
inst✝¹⁸ : Semiring R₂✝
inst✝¹⁷ : Semiring R₃
inst✝¹⁶ : AddCommMonoid M✝
inst✝¹⁵ : AddCommMonoid M₂✝
inst✝¹⁴ : AddCommMonoid M₃
σ₁₂ : R✝ →+* R₂✝
σ₂₃ : R₂✝ →+* R₃
σ₁₃ : R✝ →+* R₃
inst✝¹³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝¹² : Module R✝ M✝
inst✝¹¹ : Module R₂✝ M₂✝
inst✝¹⁰ : Module R₃ M₃
σ₂₁ : R₂✝ →+* R✝
τ₁₂✝ : R✝ →+* R₂✝
τ₂₃ : R₂✝ →+* R₃
τ₁₃ : R✝ →+* R₃
inst✝⁹ : RingHomCompTriple τ₁₂✝ τ₂₃ τ₁₃
F : Type u_11
inst✝⁸ : FunLike F M✝ M₂✝
inst✝⁷ : SemilinearMapClass F τ₁₂✝ M✝ M₂✝
R : Type u_12
R₂ : Type u_13
M : Type u_14
M₂ : Type u_15
inst✝⁶ : Semiring R
inst✝⁵ : Ring R₂
inst✝⁴ : AddCommMonoid M
inst✝³ : AddCommGroup M₂
inst✝² : Module R M
inst✝¹ : Module R₂ M₂
τ₁₂ : R →+* R₂
inst✝ : RingHomSurjective τ₁₂
f : M →ₛₗ[τ₁₂] M₂
⊢ range (-f) = range f
state_after: R✝ : Type u_1
R₂✝ : Type u_2
R₃ : Type u_3
K : Type u_4
K₂ : Type u_5
M✝ : Type u_6
M₂✝ : Type u_7
M₃ : Type u_8
V : Type u_9
V₂ : Type u_10
inst✝¹⁹ : Semiring R✝
inst✝¹⁸ : Semiring R₂✝
inst✝¹⁷ : Semiring R₃
inst✝¹⁶ : AddCommMonoid M✝
inst✝¹⁵ : AddCommMonoid M₂✝
inst✝¹⁴ : AddCommMonoid M₃
σ₁₂ : R✝ →+* R₂✝
σ₂₃ : R₂✝ →+* R₃
σ₁₃ : R✝ →+* R₃
inst✝¹³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝¹² : Module R✝ M✝
inst✝¹¹ : Module R₂✝ M₂✝
inst✝¹⁰ : Module R₃ M₃
σ₂₁ : R₂✝ →+* R✝
τ₁₂✝ : R✝ →+* R₂✝
τ₂₃ : R₂✝ →+* R₃
τ₁₃ : R✝ →+* R₃
inst✝⁹ : RingHomCompTriple τ₁₂✝ τ₂₃ τ₁₃
F : Type u_11
inst✝⁸ : FunLike F M✝ M₂✝
inst✝⁷ : SemilinearMapClass F τ₁₂✝ M✝ M₂✝
R : Type u_12
R₂ : Type u_13
M : Type u_14
M₂ : Type u_15
inst✝⁶ : Semiring R
inst✝⁵ : Ring R₂
inst✝⁴ : AddCommMonoid M
inst✝³ : AddCommGroup M₂
inst✝² : Module R M
inst✝¹ : Module R₂ M₂
τ₁₂ : R →+* R₂
inst✝ : RingHomSurjective τ₁₂
f : M →ₛₗ[τ₁₂] M₂
⊢ range ((-id).comp f) = range f

tactic: rw [range_comp, Submodule.map_neg, Submodule.map_id]
state_before: R✝ : Type u_1
R₂✝ : Type u_2
R₃ : Type u_3
K : Type u_4
K₂ : Type u_5
M✝ : Type u_6
M₂✝ : Type u_7
M₃ : Type u_8
V : Type u_9
V₂ : Type u_10
inst✝¹⁹ : Semiring R✝
inst✝¹⁸ : Semiring R₂✝
inst✝¹⁷ : Semiring R₃
inst✝¹⁶ : AddCommMonoid M✝
inst✝¹⁵ : AddCommMonoid M₂✝
inst✝¹⁴ : AddCommMonoid M₃
σ₁₂ : R✝ →+* R₂✝
σ₂₃ : R₂✝ →+* R₃
σ₁₃ : R✝ →+* R₃
inst✝¹³ : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝¹² : Module R✝ M✝
inst✝¹¹ : Module R₂✝ M₂✝
inst✝¹⁰ : Module R₃ M₃
σ₂₁ : R₂✝ →+* R✝
τ₁₂✝ : R✝ →+* R₂✝
τ₂₃ : R₂✝ →+* R₃
τ₁₃ : R✝ →+* R₃
inst✝⁹ : RingHomCompTriple τ₁₂✝ τ₂₃ τ₁₃
F : Type u_11
inst✝⁸ : FunLike F M✝ M₂✝
inst✝⁷ : SemilinearMapClass F τ₁₂✝ M✝ M₂✝
R : Type u_12
R₂ : Type u_13
M : Type u_14
M₂ : Type u_15
inst✝⁶ : Semiring R
inst✝⁵ : Ring R₂
inst✝⁴ : AddCommMonoid M
inst✝³ : AddCommGroup M₂
inst✝² : Module R M
inst✝¹ : Module R₂ M₂
τ₁₂ : R →+* R₂
inst✝ : RingHomSurjective τ₁₂
f : M →ₛₗ[τ₁₂] M₂
⊢ range ((-id).comp f) = range f
state_after: no goals