tasksource/leandojo huggingface dataset:
Theorem: image2_lowerBounds_upperBounds_subset_lowerBounds_image2
File: Mathlib/Order/Bounds/Basic.lean

tactic: rintro _ ⟨a, b, ha, hb, rfl⟩
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α → β → γ
s : Set α
t : Set β
a : α
b : β
h₀ : ∀ (b : β), Monotone (swap f b)
h₁ : ∀ (a : α), Antitone (f a)
⊢ image2 f (lowerBounds s) (upperBounds t) ⊆ lowerBounds (image2 f s t)

tactic: exact mem_lowerBounds_image2_of_mem_lowerBounds_of_mem_upperBounds h₀ h₁ ha hb
state_before: case intro.intro.intro.intro
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α → β → γ
s : Set α
t : Set β
a✝ : α
b✝ : β
h₀ : ∀ (b : β), Monotone (swap f b)
h₁ : ∀ (a : α), Antitone (f a)
a : α
b : β
ha : a ∈ lowerBounds s
hb : b ∈ upperBounds t
⊢ f a b ∈ lowerBounds (image2 f s t)
Theorem: Linarith.mul_eq
File: Mathlib/Tactic/Linarith/Lemmas.lean

tactic: simp [*]
state_before: α : Type u_1
inst✝ : OrderedSemiring α
a b : α
ha : a = 0
x✝ : 0 < b
⊢ b * a = 0
Theorem: Ico_mem_nhdsWithin_Ici
File: Mathlib/Topology/Order/Basic.lean

tactic: simp only [inter_comm, Ici_inter_Iio, Ico_subset_Ico_left H.1]
state_before: α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderClosedTopology α
a✝ b✝ : α
inst✝ : TopologicalSpace γ
a b c : α
H : b ∈ Ico a c
⊢ Iio c ∩ Ici b ⊆ Ico a c
Theorem: ContDiffAt.const_smul
File: Mathlib/Analysis/Calculus/ContDiff.lean

tactic: rw [← contDiffWithinAt_univ] at *
state_before: 𝕜 : Type u_1
inst✝¹⁴ : NontriviallyNormedField 𝕜
D : Type uD
inst✝¹³ : NormedAddCommGroup D
inst✝¹² : NormedSpace 𝕜 D
E : Type uE
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace 𝕜 E
F : Type uF
inst✝⁹ : NormedAddCommGroup F
inst✝⁸ : NormedSpace 𝕜 F
G : Type uG
inst✝⁷ : NormedAddCommGroup G
inst✝⁶ : NormedSpace 𝕜 G
X : Type ?u.2086779
inst✝⁵ : NormedAddCommGroup X
inst✝⁴ : NormedSpace 𝕜 X
s s₁ t u : Set E
f✝ f₁ : E → F
g : F → G
x✝ x₀ : E
c✝ : F
b : E × F → G
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
R : Type u_2
inst✝³ : Semiring R
inst✝² : Module R F
inst✝¹ : SMulCommClass 𝕜 R F
inst✝ : ContinuousConstSMul R F
f : E → F
x : E
c : R
hf : ContDiffAt 𝕜 n f x
⊢ ContDiffAt 𝕜 n (fun y => c • f y) x

tactic: exact hf.const_smul c
state_before: 𝕜 : Type u_1
inst✝¹⁴ : NontriviallyNormedField 𝕜
D : Type uD
inst✝¹³ : NormedAddCommGroup D
inst✝¹² : NormedSpace 𝕜 D
E : Type uE
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace 𝕜 E
F : Type uF
inst✝⁹ : NormedAddCommGroup F
inst✝⁸ : NormedSpace 𝕜 F
G : Type uG
inst✝⁷ : NormedAddCommGroup G
inst✝⁶ : NormedSpace 𝕜 G
X : Type ?u.2086779
inst✝⁵ : NormedAddCommGroup X
inst✝⁴ : NormedSpace 𝕜 X
s s₁ t u : Set E
f✝ f₁ : E → F
g : F → G
x✝ x₀ : E
c✝ : F
b : E × F → G
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
R : Type u_2
inst✝³ : Semiring R
inst✝² : Module R F
inst✝¹ : SMulCommClass 𝕜 R F
inst✝ : ContinuousConstSMul R F
f : E → F
x : E
c : R
hf : ContDiffWithinAt 𝕜 n f univ x
⊢ ContDiffWithinAt 𝕜 n (fun y => c • f y) univ x
Theorem: SimpleGraph.right_nonuniformWitnesses_subset
File: Mathlib/Combinatorics/SimpleGraph/Regularity/Uniform.lean

tactic: rw [nonuniformWitnesses, dif_pos h]
state_before: α : Type u_1
𝕜 : Type u_2
inst✝¹ : LinearOrderedField 𝕜
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : 𝕜
s t : Finset α
a b : α
h : ¬IsUniform G ε s t
⊢ (nonuniformWitnesses G ε s t).snd ⊆ t

tactic: exact (not_isUniform_iff.1 h).choose_spec.2.choose_spec.1
state_before: α : Type u_1
𝕜 : Type u_2
inst✝¹ : LinearOrderedField 𝕜
G : SimpleGraph α
inst✝ : DecidableRel G.Adj
ε : 𝕜
s t : Finset α
a b : α
h : ¬IsUniform G ε s t
⊢ (Exists.choose
          (_ :
            ∃ s',
              s' ⊆ s ∧
                ∃ t',
                  t' ⊆ t ∧
                    ↑(card s) * ε ≤ ↑(card s') ∧
                      ↑(card t) * ε ≤ ↑(card t') ∧ ε ≤ ↑(abs (edgeDensity G s' t' - edgeDensity G s t))),
        Exists.choose
          (_ :
            ∃ t',
              t' ⊆ t ∧
                ↑(card s) * ε ≤
                    ↑(card
                        (Exists.choose
                          (_ :
                            ∃ s',
                              s' ⊆ s ∧
                                ∃ t',
                                  t' ⊆ t ∧
                                    ↑(card s) * ε ≤ ↑(card s') ∧
                                      ↑(card t) * ε ≤ ↑(card t') ∧
                                        ε ≤ ↑(abs (edgeDensity G s' t' - edgeDensity G s t))))) ∧
                  ↑(card t) * ε ≤ ↑(card t') ∧
                    ε ≤
                      ↑(abs
                          (edgeDensity G
                              (Exists.choose
                                (_ :
                                  ∃ s',
                                    s' ⊆ s ∧
                                      ∃ t',
                                        t' ⊆ t ∧
                                          ↑(card s) * ε ≤ ↑(card s') ∧
                                            ↑(card t) * ε ≤ ↑(card t') ∧
                                              ε ≤ ↑(abs (edgeDensity G s' t' - edgeDensity G s t))))
                              t' -
                            edgeDensity G s t)))).snd ⊆
    t
Theorem: Decidable.not_imp_self
File: Std/Logic.lean

tactic: have := @imp_not_self (¬a)
state_before: a : Prop
inst✝ : Decidable a
⊢ ¬a → a ↔ a

tactic: rwa [not_not] at this
state_before: a : Prop
inst✝ : Decidable a
this : ¬a → ¬¬a ↔ ¬¬a
⊢ ¬a → a ↔ a
Theorem: Set.preimage_iInter₂
File: Mathlib/Data/Set/Lattice.lean

tactic: simp_rw [preimage_iInter]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.225813
ι : Sort u_3
ι' : Sort ?u.225819
ι₂ : Sort ?u.225822
κ : ι → Sort u_4
κ₁ : ι → Sort ?u.225832
κ₂ : ι → Sort ?u.225837
κ' : ι' → Sort ?u.225842
f : α → β
s : (i : ι) → κ i → Set β
⊢ (f ⁻¹' ⋂ (i : ι) (j : κ i), s i j) = ⋂ (i : ι) (j : κ i), f ⁻¹' s i j
Theorem: ContinuousLinearMap.hasSum
File: Mathlib/Topology/Algebra/InfiniteSum/Module.lean

tactic: simpa only using hf.map φ.toLinearMap.toAddMonoidHom φ.continuous
state_before: ι : Type u_5
R : Type u_1
R₂ : Type u_2
M : Type u_3
M₂ : Type u_4
inst✝⁹ : Semiring R
inst✝⁸ : Semiring R₂
inst✝⁷ : AddCommMonoid M
inst✝⁶ : Module R M
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : Module R₂ M₂
inst✝³ : TopologicalSpace M
inst✝² : TopologicalSpace M₂
σ : R →+* R₂
σ' : R₂ →+* R
inst✝¹ : RingHomInvPair σ σ'
inst✝ : RingHomInvPair σ' σ
f : ι → M
φ : M →SL[σ] M₂
x : M
hf : HasSum f x
⊢ HasSum (fun b => ↑φ (f b)) (↑φ x)
Theorem: isAlgebraic_iff_not_injective
File: Mathlib/RingTheory/Algebraic.lean

tactic: simp only [IsAlgebraic, injective_iff_map_eq_zero, not_forall, and_comm, exists_prop]
state_before: R : Type u
A : Type v
inst✝² : CommRing R
inst✝¹ : Ring A
inst✝ : Algebra R A
x : A
⊢ IsAlgebraic R x ↔ ¬Function.Injective ↑(aeval x)
Theorem: exists_ne_one_of_finprod_mem_ne_one
File: Mathlib/Algebra/BigOperators/Finprod.lean

tactic: by_contra' h'
state_before: α : Type u_2
β : Type ?u.223974
ι : Type ?u.223977
G : Type ?u.223980
M : Type u_1
N : Type ?u.223986
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t : Set α
h : (∏ᶠ (i : α) (_ : i ∈ s), f i) ≠ 1
⊢ ∃ x, x ∈ s ∧ f x ≠ 1

tactic: exact h (finprod_mem_of_eqOn_one h')
state_before: α : Type u_2
β : Type ?u.223974
ι : Type ?u.223977
G : Type ?u.223980
M : Type u_1
N : Type ?u.223986
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t : Set α
h : (∏ᶠ (i : α) (_ : i ∈ s), f i) ≠ 1
h' : ∀ (x : α), x ∈ s → f x = 1
⊢ False
Theorem: Int.four_dvd_add_or_sub_of_odd
File: Mathlib/Data/Int/Parity.lean

tactic: obtain ⟨m, rfl⟩ := ha
state_before: m n a b : ℤ
ha : Odd a
hb : Odd b
⊢ 4 ∣ a + b ∨ 4 ∣ a - b

tactic: obtain ⟨n, rfl⟩ := hb
state_before: case intro
m✝ n b : ℤ
hb : Odd b
m : ℤ
⊢ 4 ∣ 2 * m + 1 + b ∨ 4 ∣ 2 * m + 1 - b

tactic: obtain h | h := Int.even_or_odd (m + n)
state_before: case intro.intro
m✝ n✝ m n : ℤ
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1) ∨ 4 ∣ 2 * m + 1 - (2 * n + 1)

tactic: right
state_before: case intro.intro.inl
m✝ n✝ m n : ℤ
h : Even (m + n)
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1) ∨ 4 ∣ 2 * m + 1 - (2 * n + 1)

tactic: rw [Int.even_add, ← Int.even_sub] at h
state_before: case intro.intro.inl.h
m✝ n✝ m n : ℤ
h : Even (m + n)
⊢ 4 ∣ 2 * m + 1 - (2 * n + 1)

tactic: obtain ⟨k, hk⟩ := h
state_before: case intro.intro.inl.h
m✝ n✝ m n : ℤ
h : Even (m - n)
⊢ 4 ∣ 2 * m + 1 - (2 * n + 1)

tactic: convert dvd_mul_right 4 k using 1
state_before: case intro.intro.inl.h.intro
m✝ n✝ m n k : ℤ
hk : m - n = k + k
⊢ 4 ∣ 2 * m + 1 - (2 * n + 1)

tactic: rw [eq_add_of_sub_eq hk, mul_add, add_assoc, add_sub_cancel, ← two_mul, ← mul_assoc]
state_before: case h.e'_4
m✝ n✝ m n k : ℤ
hk : m - n = k + k
⊢ 2 * m + 1 - (2 * n + 1) = 4 * k

tactic: rfl
state_before: case h.e'_4
m✝ n✝ m n k : ℤ
hk : m - n = k + k
⊢ 2 * 2 * k = 4 * k

tactic: left
state_before: case intro.intro.inr
m✝ n✝ m n : ℤ
h : Odd (m + n)
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1) ∨ 4 ∣ 2 * m + 1 - (2 * n + 1)

tactic: obtain ⟨k, hk⟩ := h
state_before: case intro.intro.inr.h
m✝ n✝ m n : ℤ
h : Odd (m + n)
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1)

tactic: convert dvd_mul_right 4 (k + 1) using 1
state_before: case intro.intro.inr.h.intro
m✝ n✝ m n k : ℤ
hk : m + n = 2 * k + 1
⊢ 4 ∣ 2 * m + 1 + (2 * n + 1)

tactic: rw [eq_sub_of_add_eq hk, add_right_comm, ← add_sub, mul_add, mul_sub, add_assoc, add_assoc,
  sub_add, add_assoc, ← sub_sub (2 * n), sub_self, zero_sub, sub_neg_eq_add, ← mul_assoc,
  mul_add]
state_before: case h.e'_4
m✝ n✝ m n k : ℤ
hk : m + n = 2 * k + 1
⊢ 2 * m + 1 + (2 * n + 1) = 4 * (k + 1)

tactic: rfl
state_before: case h.e'_4
m✝ n✝ m n k : ℤ
hk : m + n = 2 * k + 1
⊢ 2 * 2 * k + (2 * 1 + (1 + 1)) = 4 * k + 4 * 1
Theorem: CategoryTheory.Biprod.ofComponents_comp
File: Mathlib/CategoryTheory/Preadditive/Biproducts.lean

tactic: dsimp [Biprod.ofComponents]
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Preadditive C
inst✝ : HasBinaryBiproducts C
X₁✝ X₂✝ Y₁✝ Y₂✝ : C
f₁₁✝ : X₁✝ ⟶ Y₁✝
f₁₂✝ : X₁✝ ⟶ Y₂✝
f₂₁✝ : X₂✝ ⟶ Y₁✝
f₂₂✝ : X₂✝ ⟶ Y₂✝
X₁ X₂ Y₁ Y₂ Z₁ Z₂ : C
f₁₁ : X₁ ⟶ Y₁
f₁₂ : X₁ ⟶ Y₂
f₂₁ : X₂ ⟶ Y₁
f₂₂ : X₂ ⟶ Y₂
g₁₁ : Y₁ ⟶ Z₁
g₁₂ : Y₁ ⟶ Z₂
g₂₁ : Y₂ ⟶ Z₁
g₂₂ : Y₂ ⟶ Z₂
⊢ ofComponents f₁₁ f₁₂ f₂₁ f₂₂ ≫ ofComponents g₁₁ g₁₂ g₂₁ g₂₂ =
    ofComponents (f₁₁ ≫ g₁₁ + f₁₂ ≫ g₂₁) (f₁₁ ≫ g₁₂ + f₁₂ ≫ g₂₂) (f₂₁ ≫ g₁₁ + f₂₂ ≫ g₂₁) (f₂₁ ≫ g₁₂ + f₂₂ ≫ g₂₂)

tactic: apply biprod.hom_ext <;> apply biprod.hom_ext' <;>
  simp only [add_comp, comp_add, add_comp_assoc, add_zero, zero_add, biprod.inl_fst,
    biprod.inl_snd, biprod.inr_fst, biprod.inr_snd, biprod.inl_fst_assoc, biprod.inl_snd_assoc,
    biprod.inr_fst_assoc, biprod.inr_snd_assoc, comp_zero, zero_comp, Category.assoc]
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Preadditive C
inst✝ : HasBinaryBiproducts C
X₁✝ X₂✝ Y₁✝ Y₂✝ : C
f₁₁✝ : X₁✝ ⟶ Y₁✝
f₁₂✝ : X₁✝ ⟶ Y₂✝
f₂₁✝ : X₂✝ ⟶ Y₁✝
f₂₂✝ : X₂✝ ⟶ Y₂✝
X₁ X₂ Y₁ Y₂ Z₁ Z₂ : C
f₁₁ : X₁ ⟶ Y₁
f₁₂ : X₁ ⟶ Y₂
f₂₁ : X₂ ⟶ Y₁
f₂₂ : X₂ ⟶ Y₂
g₁₁ : Y₁ ⟶ Z₁
g₁₂ : Y₁ ⟶ Z₂
g₂₁ : Y₂ ⟶ Z₁
g₂₂ : Y₂ ⟶ Z₂
⊢ (biprod.fst ≫ f₁₁ ≫ biprod.inl + biprod.fst ≫ f₁₂ ≫ biprod.inr + biprod.snd ≫ f₂₁ ≫ biprod.inl +
        biprod.snd ≫ f₂₂ ≫ biprod.inr) ≫
      (biprod.fst ≫ g₁₁ ≫ biprod.inl + biprod.fst ≫ g₁₂ ≫ biprod.inr + biprod.snd ≫ g₂₁ ≫ biprod.inl +
        biprod.snd ≫ g₂₂ ≫ biprod.inr) =
    biprod.fst ≫ (f₁₁ ≫ g₁₁ + f₁₂ ≫ g₂₁) ≫ biprod.inl + biprod.fst ≫ (f₁₁ ≫ g₁₂ + f₁₂ ≫ g₂₂) ≫ biprod.inr +
        biprod.snd ≫ (f₂₁ ≫ g₁₁ + f₂₂ ≫ g₂₁) ≫ biprod.inl +
      biprod.snd ≫ (f₂₁ ≫ g₁₂ + f₂₂ ≫ g₂₂) ≫ biprod.inr
Theorem: OrthonormalBasis.repr_self
File: Mathlib/Analysis/InnerProductSpace/PiL2.lean

tactic: rw [← b.repr_symm_single i, LinearIsometryEquiv.apply_symm_apply]
state_before: ι : Type u_1
ι' : Type ?u.774819
𝕜 : Type u_2
inst✝¹⁰ : IsROrC 𝕜
E : Type u_3
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : InnerProductSpace 𝕜 E
E' : Type ?u.774848
inst✝⁷ : NormedAddCommGroup E'
inst✝⁶ : InnerProductSpace 𝕜 E'
F : Type ?u.774866
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace ℝ F
F' : Type ?u.774886
inst✝³ : NormedAddCommGroup F'
inst✝² : InnerProductSpace ℝ F'
inst✝¹ : Fintype ι
inst✝ : DecidableEq ι
b : OrthonormalBasis ι 𝕜 E
i : ι
⊢ ↑b.repr (↑b i) = EuclideanSpace.single i 1
Theorem: norm_inner_div_norm_mul_norm_eq_one_of_ne_zero_of_ne_zero_mul
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: have hx' : ‖x‖ ≠ 0 := by simp [hx]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.3144481
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x : E
r : 𝕜
hx : x ≠ 0
hr : r ≠ 0
⊢ ‖inner x (r • x)‖ / (‖x‖ * ‖r • x‖) = 1

tactic: have hr' : ‖r‖ ≠ 0 := by simp [hr]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.3144481
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x : E
r : 𝕜
hx : x ≠ 0
hr : r ≠ 0
hx' : ‖x‖ ≠ 0
⊢ ‖inner x (r • x)‖ / (‖x‖ * ‖r • x‖) = 1

tactic: rw [inner_smul_right, norm_mul, ← inner_self_re_eq_norm, inner_self_eq_norm_mul_norm, norm_smul]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.3144481
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x : E
r : 𝕜
hx : x ≠ 0
hr : r ≠ 0
hx' : ‖x‖ ≠ 0
hr' : ‖r‖ ≠ 0
⊢ ‖inner x (r • x)‖ / (‖x‖ * ‖r • x‖) = 1

tactic: rw [← mul_assoc, ← div_div, mul_div_cancel _ hx', ← div_div, mul_comm, mul_div_cancel _ hr',
  div_self hx']
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.3144481
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x : E
r : 𝕜
hx : x ≠ 0
hr : r ≠ 0
hx' : ‖x‖ ≠ 0
hr' : ‖r‖ ≠ 0
⊢ ‖r‖ * (‖x‖ * ‖x‖) / (‖x‖ * (‖r‖ * ‖x‖)) = 1

tactic: simp [hx]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.3144481
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x : E
r : 𝕜
hx : x ≠ 0
hr : r ≠ 0
⊢ ‖x‖ ≠ 0

tactic: simp [hr]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.3144481
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x : E
r : 𝕜
hx : x ≠ 0
hr : r ≠ 0
hx' : ‖x‖ ≠ 0
⊢ ‖r‖ ≠ 0
Theorem: LocalEquiv.EqOnSource.target_eq
File: Mathlib/Logic/Equiv/LocalEquiv.lean

tactic: simp only [← image_source_eq_target, ← source_eq h, h.2.image_eq]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.55826
δ : Type ?u.55829
e✝ : LocalEquiv α β
e'✝ : LocalEquiv β γ
e e' : LocalEquiv α β
h : e ≈ e'
⊢ e.target = e'.target
Theorem: dist_vsub_cancel_left
File: Mathlib/Analysis/Normed/Group/AddTorsor.lean

tactic: rw [dist_eq_norm, vsub_sub_vsub_cancel_left, dist_comm, dist_eq_norm_vsub V]
state_before: α : Type ?u.14646
V : Type u_1
P : Type u_2
W : Type ?u.14655
Q : Type ?u.14658
inst✝⁵ : SeminormedAddCommGroup V
inst✝⁴ : PseudoMetricSpace P
inst✝³ : NormedAddTorsor V P
inst✝² : NormedAddCommGroup W
inst✝¹ : MetricSpace Q
inst✝ : NormedAddTorsor W Q
x y z : P
⊢ dist (x -ᵥ y) (x -ᵥ z) = dist y z
Theorem: SimpleGraph.edgeSet_sdiff_sdiff_isDiag
File: Mathlib/Combinatorics/SimpleGraph/Basic.lean

tactic: ext e
state_before: ι : Sort ?u.71069
𝕜 : Type ?u.71072
V : Type u
W : Type v
X : Type w
G✝ : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e : Sym2 V
G₁ G₂ G : SimpleGraph V
s : Set (Sym2 V)
⊢ edgeSet G \ (s \ {e | Sym2.IsDiag e}) = edgeSet G \ s

tactic: simp only [Set.mem_diff, Set.mem_setOf_eq, not_and, not_not, and_congr_right_iff]
state_before: case h
ι : Sort ?u.71069
𝕜 : Type ?u.71072
V : Type u
W : Type v
X : Type w
G✝ : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e✝ : Sym2 V
G₁ G₂ G : SimpleGraph V
s : Set (Sym2 V)
e : Sym2 V
⊢ e ∈ edgeSet G \ (s \ {e | Sym2.IsDiag e}) ↔ e ∈ edgeSet G \ s

tactic: intro h
state_before: case h
ι : Sort ?u.71069
𝕜 : Type ?u.71072
V : Type u
W : Type v
X : Type w
G✝ : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e✝ : Sym2 V
G₁ G₂ G : SimpleGraph V
s : Set (Sym2 V)
e : Sym2 V
⊢ e ∈ edgeSet G → (e ∈ s → Sym2.IsDiag e ↔ ¬e ∈ s)

tactic: simp only [G.not_isDiag_of_mem_edgeSet h, imp_false]
state_before: case h
ι : Sort ?u.71069
𝕜 : Type ?u.71072
V : Type u
W : Type v
X : Type w
G✝ : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e✝ : Sym2 V
G₁ G₂ G : SimpleGraph V
s : Set (Sym2 V)
e : Sym2 V
h : e ∈ edgeSet G
⊢ e ∈ s → Sym2.IsDiag e ↔ ¬e ∈ s
Theorem: SimpleGraph.eq_singletonSubgraph_iff_verts_eq
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: refine' ⟨fun h ↦ by rw [h, singletonSubgraph_verts], fun h ↦ _⟩
state_before: ι : Sort ?u.216099
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
H : Subgraph G
v : V
⊢ H = SimpleGraph.singletonSubgraph G v ↔ H.verts = {v}

tactic: ext
state_before: ι : Sort ?u.216099
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
H : Subgraph G
v : V
h : H.verts = {v}
⊢ H = SimpleGraph.singletonSubgraph G v

tactic: rw [h, singletonSubgraph_verts]
state_before: ι : Sort ?u.216099
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
H : Subgraph G
v : V
h : H = SimpleGraph.singletonSubgraph G v
⊢ H.verts = {v}

tactic: rw [h, singletonSubgraph_verts]
state_before: case verts.h
ι : Sort ?u.216099
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
H : Subgraph G
v : V
h : H.verts = {v}
x✝ : V
⊢ x✝ ∈ H.verts ↔ x✝ ∈ (SimpleGraph.singletonSubgraph G v).verts

tactic: simp only [Prop.bot_eq_false, singletonSubgraph_Adj, Pi.bot_apply, iff_false_iff]
state_before: case Adj.h.h.a
ι : Sort ?u.216099
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
H : Subgraph G
v : V
h : H.verts = {v}
x✝¹ x✝ : V
⊢ Subgraph.Adj H x✝¹ x✝ ↔ Subgraph.Adj (SimpleGraph.singletonSubgraph G v) x✝¹ x✝

tactic: intro ha
state_before: case Adj.h.h.a
ι : Sort ?u.216099
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
H : Subgraph G
v : V
h : H.verts = {v}
x✝¹ x✝ : V
⊢ ¬Subgraph.Adj H x✝¹ x✝

tactic: have ha1 := ha.fst_mem
state_before: case Adj.h.h.a
ι : Sort ?u.216099
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
H : Subgraph G
v : V
h : H.verts = {v}
x✝¹ x✝ : V
ha : Subgraph.Adj H x✝¹ x✝
⊢ False

tactic: have ha2 := ha.snd_mem
state_before: case Adj.h.h.a
ι : Sort ?u.216099
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
H : Subgraph G
v : V
h : H.verts = {v}
x✝¹ x✝ : V
ha : Subgraph.Adj H x✝¹ x✝
ha1 : x✝¹ ∈ H.verts
⊢ False

tactic: rw [h, Set.mem_singleton_iff] at ha1 ha2
state_before: case Adj.h.h.a
ι : Sort ?u.216099
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
H : Subgraph G
v : V
h : H.verts = {v}
x✝¹ x✝ : V
ha : Subgraph.Adj H x✝¹ x✝
ha1 : x✝¹ ∈ H.verts
ha2 : x✝ ∈ H.verts
⊢ False

tactic: subst_vars
state_before: case Adj.h.h.a
ι : Sort ?u.216099
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
H : Subgraph G
v : V
h : H.verts = {v}
x✝¹ x✝ : V
ha : Subgraph.Adj H x✝¹ x✝
ha1 : x✝¹ = v
ha2 : x✝ = v
⊢ False

tactic: exact ha.ne rfl
state_before: case Adj.h.h.a
ι : Sort ?u.216099
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
H : Subgraph G
x✝ : V
ha : Subgraph.Adj H x✝ x✝
h : H.verts = {x✝}
⊢ False
Theorem: Set.pairwise_pair
File: Mathlib/Data/Set/Pairwise/Basic.lean

tactic: simp [pairwise_insert]
state_before: α : Type u_1
β : Type ?u.12763
γ : Type ?u.12766
ι : Type ?u.12769
ι' : Type ?u.12772
r p q : α → α → Prop
f g : ι → α
s t u : Set α
a b : α
⊢ Set.Pairwise {a, b} r ↔ a ≠ b → r a b ∧ r b a
Theorem: Nat.add_choose
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: rw [choose_eq_factorial_div_factorial (Nat.le_add_left j i), add_tsub_cancel_right, mul_comm]
state_before: i j : ℕ
⊢ choose (i + j) j = (i + j)! / (i ! * j !)
Theorem: GeneralizedContinuedFraction.succ_nth_convergent'_eq_squashGCF_nth_convergent'
File: Mathlib/Algebra/ContinuedFractions/ConvergentsEquiv.lean

tactic: cases n
state_before: K : Type u_1
n : ℕ
g : GeneralizedContinuedFraction K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
⊢ convergents' g (n + 1) = convergents' (squashGCF g n) n

tactic: case zero =>
  cases g_s_head_eq : g.s.get? 0 <;>
    simp [g_s_head_eq, squashGCF, convergents', convergents'Aux, Stream'.Seq.head]
state_before: case zero
K : Type u_1
g : GeneralizedContinuedFraction K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
⊢ convergents' g (Nat.zero + 1) = convergents' (squashGCF g Nat.zero) Nat.zero

case succ
K : Type u_1
g : GeneralizedContinuedFraction K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
n✝ : ℕ
⊢ convergents' g (Nat.succ n✝ + 1) = convergents' (squashGCF g (Nat.succ n✝)) (Nat.succ n✝)

tactic: case succ =>
  simp only [succ_succ_nth_convergent'_aux_eq_succ_nth_convergent'_aux_squashSeq, convergents',
    squashGCF]
state_before: case succ
K : Type u_1
g : GeneralizedContinuedFraction K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
n✝ : ℕ
⊢ convergents' g (Nat.succ n✝ + 1) = convergents' (squashGCF g (Nat.succ n✝)) (Nat.succ n✝)

tactic: cases g_s_head_eq : g.s.get? 0 <;>
  simp [g_s_head_eq, squashGCF, convergents', convergents'Aux, Stream'.Seq.head]
state_before: K : Type u_1
g : GeneralizedContinuedFraction K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
⊢ convergents' g (Nat.zero + 1) = convergents' (squashGCF g Nat.zero) Nat.zero

tactic: simp only [succ_succ_nth_convergent'_aux_eq_succ_nth_convergent'_aux_squashSeq, convergents',
  squashGCF]
state_before: K : Type u_1
g : GeneralizedContinuedFraction K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
n✝ : ℕ
⊢ convergents' g (Nat.succ n✝ + 1) = convergents' (squashGCF g (Nat.succ n✝)) (Nat.succ n✝)
Theorem: LinearEquiv.piRing_symm_apply
File: Mathlib/LinearAlgebra/Pi.lean

tactic: simp [piRing, LinearMap.lsum_apply]
state_before: R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
ι' : Type x'
inst✝¹³ : Semiring R
φ : ι → Type ?u.240876
ψ : ι → Type ?u.240881
χ : ι → Type ?u.240886
inst✝¹² : (i : ι) → AddCommMonoid (φ i)
inst✝¹¹ : (i : ι) → Module R (φ i)
inst✝¹⁰ : (i : ι) → AddCommMonoid (ψ i)
inst✝⁹ : (i : ι) → Module R (ψ i)
inst✝⁸ : (i : ι) → AddCommMonoid (χ i)
inst✝⁷ : (i : ι) → Module R (χ i)
S : Type u_1
inst✝⁶ : Fintype ι
inst✝⁵ : DecidableEq ι
inst✝⁴ : Semiring S
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : Module S M
inst✝ : SMulCommClass R S M
f : ι → M
g : ι → R
⊢ ↑(↑(symm (piRing R M ι S)) f) g = ∑ i : ι, g i • f i
Theorem: Nat.euler_four_squares
File: Mathlib/NumberTheory/SumFourSquares.lean

tactic: rw [← Int.coe_nat_inj']
state_before: a b c d x y z w : ℕ
⊢ Int.natAbs (↑a * ↑x - ↑b * ↑y - ↑c * ↑z - ↑d * ↑w) ^ 2 + Int.natAbs (↑a * ↑y + ↑b * ↑x + ↑c * ↑w - ↑d * ↑z) ^ 2 +
        Int.natAbs (↑a * ↑z - ↑b * ↑w + ↑c * ↑x + ↑d * ↑y) ^ 2 +
      Int.natAbs (↑a * ↑w + ↑b * ↑z - ↑c * ↑y + ↑d * ↑x) ^ 2 =
    (a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2)

tactic: push_cast
state_before: a b c d x y z w : ℕ
⊢ ↑(Int.natAbs (↑a * ↑x - ↑b * ↑y - ↑c * ↑z - ↑d * ↑w) ^ 2 + Int.natAbs (↑a * ↑y + ↑b * ↑x + ↑c * ↑w - ↑d * ↑z) ^ 2 +
          Int.natAbs (↑a * ↑z - ↑b * ↑w + ↑c * ↑x + ↑d * ↑y) ^ 2 +
        Int.natAbs (↑a * ↑w + ↑b * ↑z - ↑c * ↑y + ↑d * ↑x) ^ 2) =
    ↑((a ^ 2 + b ^ 2 + c ^ 2 + d ^ 2) * (x ^ 2 + y ^ 2 + z ^ 2 + w ^ 2))

tactic: simp only [sq_abs, _root_.euler_four_squares]
state_before: a b c d x y z w : ℕ
⊢ abs (↑a * ↑x - ↑b * ↑y - ↑c * ↑z - ↑d * ↑w) ^ 2 + abs (↑a * ↑y + ↑b * ↑x + ↑c * ↑w - ↑d * ↑z) ^ 2 +
        abs (↑a * ↑z - ↑b * ↑w + ↑c * ↑x + ↑d * ↑y) ^ 2 +
      abs (↑a * ↑w + ↑b * ↑z - ↑c * ↑y + ↑d * ↑x) ^ 2 =
    (↑a ^ 2 + ↑b ^ 2 + ↑c ^ 2 + ↑d ^ 2) * (↑x ^ 2 + ↑y ^ 2 + ↑z ^ 2 + ↑w ^ 2)
Theorem: PNat.Coprime.coprime_dvd_left
File: Mathlib/Data/PNat/Prime.lean

tactic: rw [dvd_iff]
state_before: m k n : ℕ+
⊢ m ∣ k → Coprime k n → Coprime m n

tactic: repeat' rw [← coprime_coe]
state_before: m k n : ℕ+
⊢ ↑m ∣ ↑k → Coprime k n → Coprime m n

tactic: apply Nat.coprime.coprime_dvd_left
state_before: m k n : ℕ+
⊢ ↑m ∣ ↑k → coprime ↑k ↑n → coprime ↑m ↑n

tactic: rw [← coprime_coe]
state_before: m k n : ℕ+
⊢ ↑m ∣ ↑k → coprime ↑k ↑n → coprime ↑m ↑n