tasksource/leandojo huggingface dataset:
Theorem: Real.hasDerivAt_tan
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/ArctanDeriv.lean

tactic: exact_mod_cast (Complex.hasDerivAt_tan (by exact_mod_cast h)).real_of_complex
state_before: x : ℝ
h : cos x ≠ 0
⊢ HasDerivAt tan (↑1 / cos x ^ 2) x

tactic: exact_mod_cast h
state_before: x : ℝ
h : cos x ≠ 0
⊢ Complex.cos ↑x ≠ 0
Theorem: MvPolynomial.aeval_esymm_eq_multiset_esymm
File: Mathlib/RingTheory/MvPolynomial/Symmetric.lean

tactic: simp_rw [esymm, aeval_sum, aeval_prod, aeval_X, Finset.esymm_map_val]
state_before: σ : Type u_3
R : Type u_1
τ : Type ?u.70471
S : Type u_2
inst✝⁴ : CommSemiring R
inst✝³ : CommSemiring S
inst✝² : Fintype σ
inst✝¹ : Fintype τ
inst✝ : Algebra R S
f : σ → S
n : ℕ
⊢ ↑(aeval f) (esymm σ R n) = Multiset.esymm (Multiset.map f univ.val) n
Theorem: Nat.choose_one_right
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: induction n <;> simp [*, choose, add_comm]
state_before: n : ℕ
⊢ choose n 1 = n
Theorem: sbtw_comm
File: Mathlib/Analysis/Convex/Between.lean

tactic: rw [Sbtw, Sbtw, wbtw_comm, ← and_assoc, ← and_assoc, and_right_comm]
state_before: R : Type u_1
V : Type u_2
V' : Type ?u.146841
P : Type u_3
P' : Type ?u.146847
inst✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x y z : P
⊢ Sbtw R x y z ↔ Sbtw R z y x
Theorem: Finset.orderEmbOfFin_last
File: Mathlib/Data/Finset/Sort.lean

tactic: simp [orderEmbOfFin_apply, max'_eq_sorted_last, h]
state_before: α : Type u_1
β : Type ?u.44950
inst✝ : LinearOrder α
s : Finset α
k : ℕ
h : card s = k
hz : 0 < k
⊢ ↑(orderEmbOfFin s h) { val := k - 1, isLt := (_ : k - 1 < k) } = max' s (_ : Finset.Nonempty s)
Theorem: Matrix.IsHermitian.ext
File: Mathlib/LinearAlgebra/Matrix/Hermitian.lean

tactic: intro h
state_before: α : Type u_2
β : Type ?u.2918
m : Type ?u.2921
n : Type u_1
A✝ : Matrix n n α
inst✝¹ : Star α
inst✝ : Star β
A : Matrix n n α
⊢ (∀ (i j : n), star (A j i) = A i j) → IsHermitian A

tactic: ext (i j)
state_before: α : Type u_2
β : Type ?u.2918
m : Type ?u.2921
n : Type u_1
A✝ : Matrix n n α
inst✝¹ : Star α
inst✝ : Star β
A : Matrix n n α
h : ∀ (i j : n), star (A j i) = A i j
⊢ IsHermitian A

tactic: exact h i j
state_before: case a.h
α : Type u_2
β : Type ?u.2918
m : Type ?u.2921
n : Type u_1
A✝ : Matrix n n α
inst✝¹ : Star α
inst✝ : Star β
A : Matrix n n α
h : ∀ (i j : n), star (A j i) = A i j
i j : n
⊢ Aᴴ i j = A i j
Theorem: CategoryTheory.IsPullback.isoPullback_hom_fst
File: Mathlib/CategoryTheory/Limits/Shapes/CommSq.lean

tactic: dsimp [isoPullback, cone, CommSq.cone]
state_before: C : Type u₁
inst✝¹ : Category C
P X Y Z : C
fst : P ⟶ X
snd : P ⟶ Y
f : X ⟶ Z
g : Y ⟶ Z
h : IsPullback fst snd f g
inst✝ : HasPullback f g
⊢ (isoPullback h).hom ≫ pullback.fst = fst

tactic: simp
state_before: C : Type u₁
inst✝¹ : Category C
P X Y Z : C
fst : P ⟶ X
snd : P ⟶ Y
f : X ⟶ Z
g : Y ⟶ Z
h : IsPullback fst snd f g
inst✝ : HasPullback f g
⊢ (limit.isoLimitCone { cone := PullbackCone.mk fst snd (_ : fst ≫ f = snd ≫ g), isLimit := isLimit h }).inv ≫
      pullback.fst =
    fst
Theorem: RingHom.rangeS_eq_map
File: Mathlib/RingTheory/Subsemiring/Basic.lean

tactic: ext
state_before: R : Type u
S : Type v
T : Type w
inst✝² : NonAssocSemiring R
M : Submonoid R
inst✝¹ : NonAssocSemiring S
inst✝ : NonAssocSemiring T
g : S →+* T
f✝ f : R →+* S
⊢ rangeS f = Subsemiring.map f ⊤

tactic: simp
state_before: case h
R : Type u
S : Type v
T : Type w
inst✝² : NonAssocSemiring R
M : Submonoid R
inst✝¹ : NonAssocSemiring S
inst✝ : NonAssocSemiring T
g : S →+* T
f✝ f : R →+* S
x✝ : S
⊢ x✝ ∈ rangeS f ↔ x✝ ∈ Subsemiring.map f ⊤
Theorem: Set.ordConnectedComponent_inter
File: Mathlib/Data/Set/Intervals/OrdConnectedComponent.lean

tactic: simp [ordConnectedComponent, setOf_and]
state_before: α : Type u_1
inst✝ : LinearOrder α
s✝ t✝ : Set α
x✝ y z : α
s t : Set α
x : α
⊢ ordConnectedComponent (s ∩ t) x = ordConnectedComponent s x ∩ ordConnectedComponent t x
Theorem: rank_eq_zero
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: rw [h, rank_bot]
state_before: K : Type u
V : Type v
inst✝² : DivisionRing K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
S : Submodule K V
h : S = ⊥
⊢ Module.rank K { x // x ∈ S } = 0
Theorem: Cardinal.mk_list_eq_mk
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: simp
state_before: α : Type u
inst✝ : Infinite α
H1 : ℵ₀ ≤ (#α)
x✝ : α
⊢ ∀ ⦃a₂ : α⦄, (fun a => [a]) x✝ = (fun a => [a]) a₂ → x✝ = a₂

tactic: simp [H1]
state_before: α : Type u
inst✝ : Infinite α
H1 : ℵ₀ ≤ (#α)
⊢ (sum fun x => #α) = (#α)
Theorem: Nat.factorization_lcm
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: rw [← add_right_inj (a.gcd b).factorization, ←
  factorization_mul (mt gcd_eq_zero_iff.1 fun h => ha h.1) (lcm_ne_zero ha hb), gcd_mul_lcm,
  factorization_gcd ha hb, factorization_mul ha hb]
state_before: a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ factorization (lcm a b) = factorization a ⊔ factorization b

tactic: ext1
state_before: a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ factorization a + factorization b = factorization a ⊓ factorization b + factorization a ⊔ factorization b

tactic: exact (min_add_max _ _).symm
state_before: case h
a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
a✝ : ℕ
⊢ ↑(factorization a + factorization b) a✝ = ↑(factorization a ⊓ factorization b + factorization a ⊔ factorization b) a✝
Theorem: Nat.pow_succ'
File: Std/Data/Nat/Lemmas.lean

tactic: rw [Nat.pow_succ, Nat.mul_comm]
state_before: m n : Nat
⊢ m ^ succ n = m * m ^ n
Theorem: absorbent_iff_forall_absorbs_singleton
File: Mathlib/Analysis/LocallyConvex/Basic.lean

tactic: simp_rw [Absorbs, Absorbent, singleton_subset_iff]
state_before: 𝕜 : Type u_1
𝕝 : Type ?u.6901
E : Type u_2
ι : Sort ?u.6907
κ : ι → Sort ?u.6912
inst✝¹ : SeminormedRing 𝕜
inst✝ : SMul 𝕜 E
s t u v A B : Set E
⊢ Absorbent 𝕜 A ↔ ∀ (x : E), Absorbs 𝕜 A {x}
Theorem: Function.Injective.sigma_map
File: Mathlib/Data/Sigma/Basic.lean

tactic: obtain rfl : i = j := h₁ (Sigma.mk.inj_iff.mp h).1
state_before: α : Type ?u.6398
α₁ : Type u_1
α₂ : Type u_2
β : α → Type ?u.6409
β₁ : α₁ → Type u_3
β₂ : α₂ → Type u_4
f₁ : α₁ → α₂
f₂ : (a : α₁) → β₁ a → β₂ (f₁ a)
h₁ : Injective f₁
h₂ : ∀ (a : α₁), Injective (f₂ a)
i : α₁
x : β₁ i
j : α₁
y : β₁ j
h : Sigma.map f₁ f₂ { fst := i, snd := x } = Sigma.map f₁ f₂ { fst := j, snd := y }
⊢ { fst := i, snd := x } = { fst := j, snd := y }

tactic: obtain rfl : x = y := h₂ i (sigma_mk_injective h)
state_before: α : Type ?u.6398
α₁ : Type u_1
α₂ : Type u_2
β : α → Type ?u.6409
β₁ : α₁ → Type u_3
β₂ : α₂ → Type u_4
f₁ : α₁ → α₂
f₂ : (a : α₁) → β₁ a → β₂ (f₁ a)
h₁ : Injective f₁
h₂ : ∀ (a : α₁), Injective (f₂ a)
i : α₁
x y : β₁ i
h : Sigma.map f₁ f₂ { fst := i, snd := x } = Sigma.map f₁ f₂ { fst := i, snd := y }
⊢ { fst := i, snd := x } = { fst := i, snd := y }

tactic: rfl
state_before: α : Type ?u.6398
α₁ : Type u_1
α₂ : Type u_2
β : α → Type ?u.6409
β₁ : α₁ → Type u_3
β₂ : α₂ → Type u_4
f₁ : α₁ → α₂
f₂ : (a : α₁) → β₁ a → β₂ (f₁ a)
h₁ : Injective f₁
h₂ : ∀ (a : α₁), Injective (f₂ a)
i : α₁
x : β₁ i
h : Sigma.map f₁ f₂ { fst := i, snd := x } = Sigma.map f₁ f₂ { fst := i, snd := x }
⊢ { fst := i, snd := x } = { fst := i, snd := x }
Theorem: MvPolynomial.IsWeightedHomogeneous.inj_right
File: Mathlib/RingTheory/MvPolynomial/WeightedHomogeneous.lean

tactic: obtain ⟨d, hd⟩ : ∃ d, coeff d φ ≠ 0 := exists_coeff_ne_zero hφ
state_before: R : Type u_1
M : Type u_3
inst✝¹ : CommSemiring R
σ : Type u_2
inst✝ : AddCommMonoid M
φ ψ : MvPolynomial σ R
m n : M
w : σ → M
hφ : φ ≠ 0
hm : IsWeightedHomogeneous w φ m
hn : IsWeightedHomogeneous w φ n
⊢ m = n

tactic: rw [← hm hd, ← hn hd]
state_before: case intro
R : Type u_1
M : Type u_3
inst✝¹ : CommSemiring R
σ : Type u_2
inst✝ : AddCommMonoid M
φ ψ : MvPolynomial σ R
m n : M
w : σ → M
hφ : φ ≠ 0
hm : IsWeightedHomogeneous w φ m
hn : IsWeightedHomogeneous w φ n
d : σ →₀ ℕ
hd : coeff d φ ≠ 0
⊢ m = n
Theorem: Nat.le_floor_iff'
File: Mathlib/Algebra/Order/Floor.lean

tactic: obtain ha | ha := le_total a 0
state_before: F : Type ?u.28566
α : Type u_1
β : Type ?u.28572
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a : α
n : ℕ
hn : n ≠ 0
⊢ n ≤ ⌊a⌋₊ ↔ ↑n ≤ a

tactic: rw [floor_of_nonpos ha]
state_before: case inl
F : Type ?u.28566
α : Type u_1
β : Type ?u.28572
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a : α
n : ℕ
hn : n ≠ 0
ha : a ≤ 0
⊢ n ≤ ⌊a⌋₊ ↔ ↑n ≤ a

tactic: exact
  iff_of_false (Nat.pos_of_ne_zero hn).not_le
    (not_le_of_lt <| ha.trans_lt <| cast_pos.2 <| Nat.pos_of_ne_zero hn)
state_before: case inl
F : Type ?u.28566
α : Type u_1
β : Type ?u.28572
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a : α
n : ℕ
hn : n ≠ 0
ha : a ≤ 0
⊢ n ≤ 0 ↔ ↑n ≤ a

tactic: exact le_floor_iff ha
state_before: case inr
F : Type ?u.28566
α : Type u_1
β : Type ?u.28572
inst✝¹ : LinearOrderedSemiring α
inst✝ : FloorSemiring α
a : α
n : ℕ
hn : n ≠ 0
ha : 0 ≤ a
⊢ n ≤ ⌊a⌋₊ ↔ ↑n ≤ a
Theorem: Int.mul_ediv_mul_of_pos
File: Std/Data/Int/DivMod.lean

tactic: rw [Int.mul_neg, Int.ediv_neg, Int.ediv_neg]
state_before: a b c : Int
this : ∀ (m k : Nat) (b : Int), ↑(succ m) * b / (↑(succ m) * ↑k) = b / ↑k
m k : Nat
H : 0 < ↑(succ m)
⊢ ↑(succ m) * b / (↑(succ m) * -↑k) = b / -↑k

tactic: apply congrArg Neg.neg
state_before: a b c : Int
this : ∀ (m k : Nat) (b : Int), ↑(succ m) * b / (↑(succ m) * ↑k) = b / ↑k
m k : Nat
H : 0 < ↑(succ m)
⊢ -(↑(succ m) * b / (↑(succ m) * ↑k)) = -(b / ↑k)

tactic: apply this
state_before: a b c : Int
this : ∀ (m k : Nat) (b : Int), ↑(succ m) * b / (↑(succ m) * ↑k) = b / ↑k
m k : Nat
H : 0 < ↑(succ m)
⊢ ↑(succ m) * b / (↑(succ m) * ↑k) = b / ↑k

tactic: rw [Int.ofNat_zero, Int.mul_zero, Int.ediv_zero, Int.ediv_zero]
state_before: a b✝ c : Int
H : 0 < a
m k : Nat
b : Int
n : Nat
⊢ ↑(succ m) * -[n+1] / (↑(succ m) * ↑0) = -[n+1] / ↑0

tactic: apply Nat.div_eq_of_lt_le
state_before: a b✝ c : Int
H : 0 < a
m k✝ : Nat
b : Int
n k : Nat
⊢ (succ m * n + m) / (succ m * succ k) = n / succ k

tactic: refine Nat.le_trans ?_ (Nat.le_add_right _ _)
state_before: case lo
a b✝ c : Int
H : 0 < a
m k✝ : Nat
b : Int
n k : Nat
⊢ n / succ k * (succ m * succ k) ≤ succ m * n + m

tactic: rw [← Nat.mul_div_mul_left _ _ m.succ_pos]
state_before: case lo
a b✝ c : Int
H : 0 < a
m k✝ : Nat
b : Int
n k : Nat
⊢ n / succ k * (succ m * succ k) ≤ succ m * n

tactic: apply Nat.div_mul_le_self
state_before: case lo
a b✝ c : Int
H : 0 < a
m k✝ : Nat
b : Int
n k : Nat
⊢ succ m * n / (succ m * succ k) * (succ m * succ k) ≤ succ m * n

tactic: show m.succ * n.succ ≤ _
state_before: case hi
a b✝ c : Int
H : 0 < a
m k✝ : Nat
b : Int
n k : Nat
⊢ succ m * n + m < succ (n / succ k) * (succ m * succ k)

tactic: rw [Nat.mul_left_comm]
state_before: case hi
a b✝ c : Int
H : 0 < a
m k✝ : Nat
b : Int
n k : Nat
⊢ succ m * succ n ≤ succ (n / succ k) * (succ m * succ k)

tactic: apply Nat.mul_le_mul_left
state_before: case hi
a b✝ c : Int
H : 0 < a
m k✝ : Nat
b : Int
n k : Nat
⊢ succ m * succ n ≤ succ m * (succ (n / succ k) * succ k)

tactic: apply (Nat.div_lt_iff_lt_mul k.succ_pos).1
state_before: case hi.h
a b✝ c : Int
H : 0 < a
m k✝ : Nat
b : Int
n k : Nat
⊢ succ n ≤ succ (n / succ k) * succ k

tactic: apply Nat.lt_succ_self
state_before: case hi.h
a b✝ c : Int
H : 0 < a
m k✝ : Nat
b : Int
n k : Nat
⊢ n / succ k < succ (n / succ k)
Theorem: PEquiv.trans_refl
File: Mathlib/Data/PEquiv.lean

tactic: ext
state_before: α : Type u
β : Type v
γ : Type w
δ : Type x
f : α ≃. β
⊢ PEquiv.trans f (PEquiv.refl β) = f

tactic: dsimp [PEquiv.trans]
state_before: case h.a
α : Type u
β : Type v
γ : Type w
δ : Type x
f : α ≃. β
x✝ : α
a✝ : β
⊢ a✝ ∈ ↑(PEquiv.trans f (PEquiv.refl β)) x✝ ↔ a✝ ∈ ↑f x✝

tactic: simp
state_before: case h.a
α : Type u
β : Type v
γ : Type w
δ : Type x
f : α ≃. β
x✝ : α
a✝ : β
⊢ a✝ ∈ Option.bind (↑f x✝) ↑(PEquiv.refl β) ↔ a✝ ∈ ↑f x✝
Theorem: Decidable.not_iff_comm
File: Std/Logic.lean

tactic: rw [@iff_def (¬a), @iff_def (¬b)]
state_before: a b : Prop
inst✝¹ : Decidable a
inst✝ : Decidable b
⊢ (¬a ↔ b) ↔ (¬b ↔ a)

tactic: exact and_congr not_imp_comm imp_not_comm
state_before: a b : Prop
inst✝¹ : Decidable a
inst✝ : Decidable b
⊢ (¬a → b) ∧ (b → ¬a) ↔ (¬b → a) ∧ (a → ¬b)
Theorem: Filter.HasBasis.nhds_of_one
File: Mathlib/Topology/Algebra/Group/Basic.lean

tactic: rw [← nhds_translation_mul_inv]
state_before: α : Type u
β : Type v
G : Type w
H : Type x
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x✝ : α
ι : Sort u_1
p : ι → Prop
s : ι → Set G
hb : HasBasis (𝓝 1) p s
x : G
⊢ HasBasis (𝓝 x) p fun i => {y | y / x ∈ s i}

tactic: simp_rw [div_eq_mul_inv]
state_before: α : Type u
β : Type v
G : Type w
H : Type x
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x✝ : α
ι : Sort u_1
p : ι → Prop
s : ι → Set G
hb : HasBasis (𝓝 1) p s
x : G
⊢ HasBasis (Filter.comap (fun y => y * x⁻¹) (𝓝 1)) p fun i => {y | y / x ∈ s i}

tactic: exact hb.comap _
state_before: α : Type u
β : Type v
G : Type w
H : Type x
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x✝ : α
ι : Sort u_1
p : ι → Prop
s : ι → Set G
hb : HasBasis (𝓝 1) p s
x : G
⊢ HasBasis (Filter.comap (fun y => y * x⁻¹) (𝓝 1)) p fun i => {y | y * x⁻¹ ∈ s i}
Theorem: List.take_append_eq_append_take
File: Mathlib/Data/List/Basic.lean

tactic: induction l₁ generalizing n
state_before: ι : Type ?u.163016
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂✝ l₁ l₂ : List α
n : ℕ
⊢ take n (l₁ ++ l₂) = take n l₁ ++ take (n - length l₁) l₂

tactic: {simp}
state_before: case nil
ι : Type ?u.163016
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂✝ l₂ : List α
n : ℕ
⊢ take n ([] ++ l₂) = take n [] ++ take (n - length []) l₂

case cons
ι : Type ?u.163016
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂✝ l₂ : List α
head✝ : α
tail✝ : List α
tail_ih✝ : ∀ {n : ℕ}, take n (tail✝ ++ l₂) = take n tail✝ ++ take (n - length tail✝) l₂
n : ℕ
⊢ take n (head✝ :: tail✝ ++ l₂) = take n (head✝ :: tail✝) ++ take (n - length (head✝ :: tail✝)) l₂

tactic: cases n <;> simp [*]
state_before: case cons
ι : Type ?u.163016
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂✝ l₂ : List α
head✝ : α
tail✝ : List α
tail_ih✝ : ∀ {n : ℕ}, take n (tail✝ ++ l₂) = take n tail✝ ++ take (n - length tail✝) l₂
n : ℕ
⊢ take n (head✝ :: tail✝ ++ l₂) = take n (head✝ :: tail✝) ++ take (n - length (head✝ :: tail✝)) l₂
Theorem: Traversable.foldrm.ofFreeMonoid_comp_of
File: Mathlib/Control/Fold.lean

tactic: ext
state_before: α β γ : Type u
t : Type u → Type u
inst✝³ : Traversable t
inst✝² : IsLawfulTraversable t
m : Type u → Type u
inst✝¹ : Monad m
inst✝ : LawfulMonad m
f : β → α → m α
⊢ ↑(foldrM.ofFreeMonoid f) ∘ FreeMonoid.of = foldrM.mk ∘ f
Theorem: MvPolynomial.eval₂_X
File: Mathlib/Data/MvPolynomial/Basic.lean

tactic: simp [eval₂_monomial, f.map_one, X, prod_single_index, pow_one]
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n✝ m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p q : MvPolynomial σ R
f : R →+* S₁
g : σ → S₁
n : σ
⊢ eval₂ f g (X n) = g n
Theorem: List.zipWith_distrib_drop
File: Mathlib/Data/List/Zip.lean

tactic: induction' l with hd tl hl generalizing l' n
state_before: α : Type u
β : Type u_2
γ : Type u_1
δ : Type ?u.208573
ε : Type ?u.208576
f : α → β → γ
l : List α
l' : List β
n : ℕ
⊢ drop n (zipWith f l l') = zipWith f (drop n l) (drop n l')

tactic: simp
state_before: case nil
α : Type u
β : Type u_2
γ : Type u_1
δ : Type ?u.208573
ε : Type ?u.208576
f : α → β → γ
l : List α
l'✝ : List β
n✝ : ℕ
l' : List β
n : ℕ
⊢ drop n (zipWith f [] l') = zipWith f (drop n []) (drop n l')

tactic: cases l'
state_before: case cons
α : Type u
β : Type u_2
γ : Type u_1
δ : Type ?u.208573
ε : Type ?u.208576
f : α → β → γ
l : List α
l'✝ : List β
n✝ : ℕ
hd : α
tl : List α
hl : ∀ (l' : List β) (n : ℕ), drop n (zipWith f tl l') = zipWith f (drop n tl) (drop n l')
l' : List β
n : ℕ
⊢ drop n (zipWith f (hd :: tl) l') = zipWith f (drop n (hd :: tl)) (drop n l')

tactic: simp
state_before: case cons.nil
α : Type u
β : Type u_2
γ : Type u_1
δ : Type ?u.208573
ε : Type ?u.208576
f : α → β → γ
l : List α
l' : List β
n✝ : ℕ
hd : α
tl : List α
hl : ∀ (l' : List β) (n : ℕ), drop n (zipWith f tl l') = zipWith f (drop n tl) (drop n l')
n : ℕ
⊢ drop n (zipWith f (hd :: tl) []) = zipWith f (drop n (hd :: tl)) (drop n [])

tactic: cases n
state_before: case cons.cons
α : Type u
β : Type u_2
γ : Type u_1
δ : Type ?u.208573
ε : Type ?u.208576
f : α → β → γ
l : List α
l' : List β
n✝ : ℕ
hd : α
tl : List α
hl : ∀ (l' : List β) (n : ℕ), drop n (zipWith f tl l') = zipWith f (drop n tl) (drop n l')
n : ℕ
head✝ : β
tail✝ : List β
⊢ drop n (zipWith f (hd :: tl) (head✝ :: tail✝)) = zipWith f (drop n (hd :: tl)) (drop n (head✝ :: tail✝))

tactic: simp
state_before: case cons.cons.zero
α : Type u
β : Type u_2
γ : Type u_1
δ : Type ?u.208573
ε : Type ?u.208576
f : α → β → γ
l : List α
l' : List β
n : ℕ
hd : α
tl : List α
hl : ∀ (l' : List β) (n : ℕ), drop n (zipWith f tl l') = zipWith f (drop n tl) (drop n l')
head✝ : β
tail✝ : List β
⊢ drop zero (zipWith f (hd :: tl) (head✝ :: tail✝)) = zipWith f (drop zero (hd :: tl)) (drop zero (head✝ :: tail✝))

tactic: simp [hl]
state_before: case cons.cons.succ
α : Type u
β : Type u_2
γ : Type u_1
δ : Type ?u.208573
ε : Type ?u.208576
f : α → β → γ
l : List α
l' : List β
n : ℕ
hd : α
tl : List α
hl : ∀ (l' : List β) (n : ℕ), drop n (zipWith f tl l') = zipWith f (drop n tl) (drop n l')
head✝ : β
tail✝ : List β
n✝ : ℕ
⊢ drop (succ n✝) (zipWith f (hd :: tl) (head✝ :: tail✝)) =
    zipWith f (drop (succ n✝) (hd :: tl)) (drop (succ n✝) (head✝ :: tail✝))
Theorem: MvPolynomial.rank_R
File: Mathlib/FieldTheory/Finite/Polynomial.lean

tactic: rw [rank_finsupp_self']
state_before: σ K : Type u
inst✝² : Fintype K
inst✝¹ : Field K
inst✝ : Fintype σ
⊢ Module.rank K (↑{s | ∀ (n : σ), ↑s n ≤ Fintype.card K - 1} →₀ K) = (#↑{s | ∀ (n : σ), ↑s n ≤ Fintype.card K - 1})

tactic: refine' Quotient.sound ⟨Equiv.subtypeEquiv Finsupp.equivFunOnFinite fun f => _⟩
state_before: σ K : Type u
inst✝² : Fintype K
inst✝¹ : Field K
inst✝ : Fintype σ
⊢ (#↑{s | ∀ (n : σ), ↑s n ≤ Fintype.card K - 1}) = (#↑{s | ∀ (n : σ), s n < Fintype.card K})

tactic: refine' forall_congr' fun n => le_tsub_iff_right _
state_before: σ K : Type u
inst✝² : Fintype K
inst✝¹ : Field K
inst✝ : Fintype σ
f : σ →₀ ℕ
⊢ f ∈ {s | ∀ (n : σ), ↑s n ≤ Fintype.card K - 1} ↔ ↑Finsupp.equivFunOnFinite f ∈ {s | ∀ (n : σ), s n < Fintype.card K}

tactic: exact Fintype.card_pos_iff.2 ⟨0⟩
state_before: σ K : Type u
inst✝² : Fintype K
inst✝¹ : Field K
inst✝ : Fintype σ
f : σ →₀ ℕ
n : σ
⊢ 1 ≤ Fintype.card K
Theorem: Nat.prime_of_mem_factors
File: Mathlib/Data/Nat/Factors.lean

tactic: match n with
| 0 => simp
| 1 => simp
| k + 2 =>
    intro p h
    let m := minFac (k + 2)
    have : (k + 2) / m < (k + 2) := factors_lemma
    have h₁ : p = m ∨ p ∈ factors ((k + 2) / m) :=
      List.mem_cons.1 (by rwa [factors] at h)
    exact Or.casesOn h₁ (fun h₂ => h₂.symm ▸ minFac_prime (by simp)) prime_of_mem_factors
state_before: n : ℕ
⊢ ∀ {p : ℕ}, p ∈ factors n → Prime p

tactic: simp
state_before: n : ℕ
⊢ ∀ {p : ℕ}, p ∈ factors 0 → Prime p

tactic: simp
state_before: n : ℕ
⊢ ∀ {p : ℕ}, p ∈ factors 1 → Prime p

tactic: intro p h
state_before: n k : ℕ
⊢ ∀ {p : ℕ}, p ∈ factors (k + 2) → Prime p

tactic: let m := minFac (k + 2)
state_before: n k p : ℕ
h : p ∈ factors (k + 2)
⊢ Prime p

tactic: have : (k + 2) / m < (k + 2) := factors_lemma
state_before: n k p : ℕ
h : p ∈ factors (k + 2)
m : ℕ := minFac (k + 2)
⊢ Prime p

tactic: have h₁ : p = m ∨ p ∈ factors ((k + 2) / m) :=
  List.mem_cons.1 (by rwa [factors] at h)
state_before: n k p : ℕ
h : p ∈ factors (k + 2)
m : ℕ := minFac (k + 2)
this : (k + 2) / m < k + 2
⊢ Prime p

tactic: exact Or.casesOn h₁ (fun h₂ => h₂.symm ▸ minFac_prime (by simp)) prime_of_mem_factors
state_before: n k p : ℕ
h : p ∈ factors (k + 2)
m : ℕ := minFac (k + 2)
this : (k + 2) / m < k + 2
h₁ : p = m ∨ p ∈ factors ((k + 2) / m)
⊢ Prime p

tactic: rwa [factors] at h
state_before: n k p : ℕ
h : p ∈ factors (k + 2)
m : ℕ := minFac (k + 2)
this : (k + 2) / m < k + 2
⊢ p ∈ m :: factors ((k + 2) / m)

tactic: simp
state_before: n k p : ℕ
h : p ∈ factors (k + 2)
m : ℕ := minFac (k + 2)
this : (k + 2) / m < k + 2
h₁ : p = m ∨ p ∈ factors ((k + 2) / m)
h₂ : p = m
⊢ k + 2 ≠ 1
Theorem: Units.divp_add_divp_same
File: Mathlib/Algebra/Ring/Units.lean

tactic: simp only [divp, add_mul]
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : Ring α
a✝ b✝ a b : α
u : αˣ
⊢ a /ₚ u + b /ₚ u = (a + b) /ₚ u
Theorem: Array.toListRev_eq
File: Std/Data/Array/Init/Lemmas.lean

tactic: rw [toListRev, foldl_eq_foldl_data, ← List.foldr_reverse, List.foldr_self]
state_before: α : Type u_1
arr : Array α
⊢ toListRev arr = List.reverse arr.data
Theorem: CategoryTheory.Adjunction.hasLiftingProperty_iff
File: Mathlib/CategoryTheory/LiftingProperties/Adjunction.lean

tactic: constructor <;> intro <;> constructor <;> intro f g sq
state_before: C : Type u_3
D : Type u_4
inst✝¹ : Category C
inst✝ : Category D
G : C ⥤ D
F : D ⥤ C
adj : G ⊣ F
A B : C
X Y : D
i : A ⟶ B
p : X ⟶ Y
⊢ HasLiftingProperty (G.map i) p ↔ HasLiftingProperty i (F.map p)

tactic: rw [← sq.left_adjoint_hasLift_iff adj]
state_before: case mp.sq_hasLift
C : Type u_3
D : Type u_4
inst✝¹ : Category C
inst✝ : Category D
G : C ⥤ D
F : D ⥤ C
adj : G ⊣ F
A B : C
X Y : D
i : A ⟶ B
p : X ⟶ Y
a✝ : HasLiftingProperty (G.map i) p
f : A ⟶ F.obj X
g : B ⟶ F.obj Y
sq : CommSq f i (F.map p) g
⊢ CommSq.HasLift sq

tactic: infer_instance
state_before: case mp.sq_hasLift
C : Type u_3
D : Type u_4
inst✝¹ : Category C
inst✝ : Category D
G : C ⥤ D
F : D ⥤ C
adj : G ⊣ F
A B : C
X Y : D
i : A ⟶ B
p : X ⟶ Y
a✝ : HasLiftingProperty (G.map i) p
f : A ⟶ F.obj X
g : B ⟶ F.obj Y
sq : CommSq f i (F.map p) g
⊢ CommSq.HasLift (_ : CommSq (↑(homEquiv adj A X).symm f) (G.map i) p (↑(homEquiv adj B Y).symm g))

tactic: rw [← sq.right_adjoint_hasLift_iff adj]
state_before: case mpr.sq_hasLift
C : Type u_3
D : Type u_4
inst✝¹ : Category C
inst✝ : Category D
G : C ⥤ D
F : D ⥤ C
adj : G ⊣ F
A B : C
X Y : D
i : A ⟶ B
p : X ⟶ Y
a✝ : HasLiftingProperty i (F.map p)
f : G.obj A ⟶ X
g : G.obj B ⟶ Y
sq : CommSq f (G.map i) p g
⊢ CommSq.HasLift sq

tactic: infer_instance
state_before: case mpr.sq_hasLift
C : Type u_3
D : Type u_4
inst✝¹ : Category C
inst✝ : Category D
G : C ⥤ D
F : D ⥤ C
adj : G ⊣ F
A B : C
X Y : D
i : A ⟶ B
p : X ⟶ Y
a✝ : HasLiftingProperty i (F.map p)
f : G.obj A ⟶ X
g : G.obj B ⟶ Y
sq : CommSq f (G.map i) p g
⊢ CommSq.HasLift (_ : CommSq (↑(homEquiv adj A X) f) i (F.map p) (↑(homEquiv adj B Y) g))
Theorem: Set.Ico_eq_empty_iff
File: Mathlib/Data/Set/Intervals/Basic.lean

tactic: rw [← not_nonempty_iff_eq_empty, not_iff_not, nonempty_Ico]
state_before: α : Type u_1
β : Type ?u.27708
inst✝ : Preorder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ Ico a b = ∅ ↔ ¬a < b
Theorem: SimpleGraph.Walk.cons_copy
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: subst_vars
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w v' w' : V
h : Adj G u v
p : Walk G v' w'
hv : v' = v
hw : w' = w
⊢ cons h (Walk.copy p hv hw) = Walk.copy (cons (_ : Adj G u v') p) (_ : u = u) hw

tactic: rfl
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v' w' : V
p : Walk G v' w'
h : Adj G u v'
⊢ cons h (Walk.copy p (_ : v' = v') (_ : w' = w')) = Walk.copy (cons (_ : Adj G u v') p) (_ : u = u) (_ : w' = w')