tasksource/leandojo huggingface dataset:
Theorem: Relation.cutExpand_iff
File: Mathlib/Logic/Hydra.lean

tactic: simp_rw [CutExpand, add_singleton_eq_iff]
state_before: α : Type u_1
r : α → α → Prop
inst✝¹ : DecidableEq α
inst✝ : IsIrrefl α r
s' s : Multiset α
⊢ CutExpand r s' s ↔ ∃ t a, (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s ∧ s' = erase s a + t

tactic: refine' exists₂_congr fun t a ↦ ⟨_, _⟩
state_before: α : Type u_1
r : α → α → Prop
inst✝¹ : DecidableEq α
inst✝ : IsIrrefl α r
s' s : Multiset α
⊢ (∃ t a, (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s + t ∧ s' = erase (s + t) a) ↔
    ∃ t a, (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s ∧ s' = erase s a + t

tactic: rintro ⟨ht, ha, rfl⟩
state_before: case refine'_1
α : Type u_1
r : α → α → Prop
inst✝¹ : DecidableEq α
inst✝ : IsIrrefl α r
s' s t : Multiset α
a : α
⊢ (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s + t ∧ s' = erase (s + t) a →
    (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s ∧ s' = erase s a + t

tactic: obtain h | h := mem_add.1 ha
state_before: case refine'_1.intro.intro
α : Type u_1
r : α → α → Prop
inst✝¹ : DecidableEq α
inst✝ : IsIrrefl α r
s t : Multiset α
a : α
ht : ∀ (a' : α), a' ∈ t → r a' a
ha : a ∈ s + t
⊢ (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s ∧ erase (s + t) a = erase s a + t

tactic: exacts [⟨ht, h, erase_add_left_pos t h⟩, (@irrefl α r _ a (ht a h)).elim]
state_before: case refine'_1.intro.intro.inl
α : Type u_1
r : α → α → Prop
inst✝¹ : DecidableEq α
inst✝ : IsIrrefl α r
s t : Multiset α
a : α
ht : ∀ (a' : α), a' ∈ t → r a' a
ha : a ∈ s + t
h : a ∈ s
⊢ (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s ∧ erase (s + t) a = erase s a + t

case refine'_1.intro.intro.inr
α : Type u_1
r : α → α → Prop
inst✝¹ : DecidableEq α
inst✝ : IsIrrefl α r
s t : Multiset α
a : α
ht : ∀ (a' : α), a' ∈ t → r a' a
ha : a ∈ s + t
h : a ∈ t
⊢ (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s ∧ erase (s + t) a = erase s a + t

tactic: rintro ⟨ht, h, rfl⟩
state_before: case refine'_2
α : Type u_1
r : α → α → Prop
inst✝¹ : DecidableEq α
inst✝ : IsIrrefl α r
s' s t : Multiset α
a : α
⊢ (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s ∧ s' = erase s a + t →
    (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s + t ∧ s' = erase (s + t) a

tactic: exact ⟨ht, mem_add.2 (Or.inl h), (erase_add_left_pos t h).symm⟩
state_before: case refine'_2.intro.intro
α : Type u_1
r : α → α → Prop
inst✝¹ : DecidableEq α
inst✝ : IsIrrefl α r
s t : Multiset α
a : α
ht : ∀ (a' : α), a' ∈ t → r a' a
h : a ∈ s
⊢ (∀ (a' : α), a' ∈ t → r a' a) ∧ a ∈ s + t ∧ erase s a + t = erase (s + t) a
Theorem: CategoryTheory.preimage_id
File: Mathlib/CategoryTheory/Functor/FullyFaithful.lean

tactic: simp
state_before: C : Type u₁
inst✝³ : Category C
D : Type u₂
inst✝² : Category D
F : C ⥤ D
inst✝¹ : Full F
inst✝ : Faithful F
X Y Z : C
⊢ F.map (F.preimage (𝟙 (F.obj X))) = F.map (𝟙 X)
Theorem: String.utf8SetAux_of_gt
File: src/lean/Init/Data/String/Basic.lean

tactic: exact Nat.lt_of_lt_of_le h (Nat.le_add_right ..)
state_before: c' c : Char
cs : List Char
i p : Pos
h : i > p
⊢ i + c > p
Theorem: Fin.card_fintypeIco
File: Mathlib/Data/Fin/Interval.lean

tactic: rw [← card_Ico, Fintype.card_ofFinset]
state_before: n : ℕ
a b : Fin n
⊢ Fintype.card ↑(Set.Ico a b) = ↑b - ↑a
Theorem: Std.RBNode.All.setRed
File: Std/Data/RBMap/WF.lean

tactic: unfold setRed
state_before: α : Type u_1
p : α → Prop
t : RBNode α
h : All p t
⊢ All p (setRed t)

tactic: split <;> simp_all
state_before: α : Type u_1
p : α → Prop
t : RBNode α
h : All p t
⊢ All p
    (match t with
    | node c a v b => node red a v b
    | nil => nil)
Theorem: lt_mul_iff_one_lt_left'
File: Mathlib/Algebra/Order/Monoid/Lemmas.lean

tactic: rw [one_mul]
state_before: α : Type u_1
β : Type ?u.25520
inst✝³ : MulOneClass α
inst✝² : LT α
inst✝¹ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1
inst✝ : ContravariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1
a b : α
⊢ a < b * a ↔ 1 * a < b * a
Theorem: IsPrimitiveRoot.pow_inj
File: Mathlib/RingTheory/RootsOfUnity/Basic.lean

tactic: wlog hij : i ≤ j generalizing i j
state_before: M : Type u_1
N : Type ?u.1819153
G : Type ?u.1819156
R : Type ?u.1819159
S : Type ?u.1819162
F : Type ?u.1819165
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ h : IsPrimitiveRoot ζ k
i j : ℕ
hi : i < k
hj : j < k
H : ζ ^ i = ζ ^ j
⊢ i = j

tactic: apply le_antisymm hij
state_before: M : Type u_1
N : Type ?u.1819153
G : Type ?u.1819156
R : Type ?u.1819159
S : Type ?u.1819162
F : Type ?u.1819165
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ h : IsPrimitiveRoot ζ k
i j : ℕ
hi : i < k
hj : j < k
H : ζ ^ i = ζ ^ j
hij : i ≤ j
⊢ i = j

tactic: rw [← tsub_eq_zero_iff_le]
state_before: M : Type u_1
N : Type ?u.1819153
G : Type ?u.1819156
R : Type ?u.1819159
S : Type ?u.1819162
F : Type ?u.1819165
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ h : IsPrimitiveRoot ζ k
i j : ℕ
hi : i < k
hj : j < k
H : ζ ^ i = ζ ^ j
hij : i ≤ j
⊢ j ≤ i

tactic: apply Nat.eq_zero_of_dvd_of_lt _ (lt_of_le_of_lt tsub_le_self hj)
state_before: M : Type u_1
N : Type ?u.1819153
G : Type ?u.1819156
R : Type ?u.1819159
S : Type ?u.1819162
F : Type ?u.1819165
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ h : IsPrimitiveRoot ζ k
i j : ℕ
hi : i < k
hj : j < k
H : ζ ^ i = ζ ^ j
hij : i ≤ j
⊢ j - i = 0

tactic: apply h.dvd_of_pow_eq_one
state_before: M : Type u_1
N : Type ?u.1819153
G : Type ?u.1819156
R : Type ?u.1819159
S : Type ?u.1819162
F : Type ?u.1819165
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ h : IsPrimitiveRoot ζ k
i j : ℕ
hi : i < k
hj : j < k
H : ζ ^ i = ζ ^ j
hij : i ≤ j
⊢ k ∣ j - i

tactic: rw [← ((h.isUnit (lt_of_le_of_lt (Nat.zero_le _) hi)).pow i).mul_left_inj, ← pow_add,
  tsub_add_cancel_of_le hij, H, one_mul]
state_before: case a
M : Type u_1
N : Type ?u.1819153
G : Type ?u.1819156
R : Type ?u.1819159
S : Type ?u.1819162
F : Type ?u.1819165
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ h : IsPrimitiveRoot ζ k
i j : ℕ
hi : i < k
hj : j < k
H : ζ ^ i = ζ ^ j
hij : i ≤ j
⊢ ζ ^ (j - i) = 1

tactic: exact (this hj hi H.symm (le_of_not_le hij)).symm
state_before: case inr
M : Type u_1
N : Type ?u.1819153
G : Type ?u.1819156
R : Type ?u.1819159
S : Type ?u.1819162
F : Type ?u.1819165
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
inst✝ : DivisionCommMonoid G
k l : ℕ
ζ : M
f : F
h✝ h : IsPrimitiveRoot ζ k
i j : ℕ
hi : i < k
hj : j < k
H : ζ ^ i = ζ ^ j
this : ∀ ⦃i j : ℕ⦄, i < k → j < k → ζ ^ i = ζ ^ j → i ≤ j → i = j
hij : ¬i ≤ j
⊢ i = j
Theorem: PNat.XgcdType.step_v
File: Mathlib/Data/PNat/Xgcd.lean

tactic: let ha : u.r + u.b * u.q = u.a := u.rq_eq
state_before: u : XgcdType
hr : r u ≠ 0
⊢ v (step u) = Prod.swap (v u)

tactic: let hr : u.r - 1 + 1 = u.r := (add_comm _ 1).trans (add_tsub_cancel_of_le (Nat.pos_of_ne_zero hr))
state_before: u : XgcdType
hr : r u ≠ 0
ha : r u + ↑(b u) * q u = ↑(a u) := rq_eq u
⊢ v (step u) = Prod.swap (v u)

tactic: ext
state_before: u : XgcdType
hr✝ : r u ≠ 0
ha : r u + ↑(b u) * q u = ↑(a u) := rq_eq u
hr : r u - 1 + 1 = r u := Eq.trans (add_comm (r u - 1) 1) (add_tsub_cancel_of_le (Nat.pos_of_ne_zero hr✝))
⊢ v (step u) = Prod.swap (v u)

tactic: change ((u.y * u.q + u.z) * u.b + u.y * (u.r - 1 + 1) : ℕ) = u.y * u.a + u.z * u.b
state_before: case h₁
u : XgcdType
hr✝ : r u ≠ 0
ha : r u + ↑(b u) * q u = ↑(a u) := rq_eq u
hr : r u - 1 + 1 = r u := Eq.trans (add_comm (r u - 1) 1) (add_tsub_cancel_of_le (Nat.pos_of_ne_zero hr✝))
⊢ (v (step u)).fst = (Prod.swap (v u)).fst

tactic: rw [← ha, hr]
state_before: case h₁
u : XgcdType
hr✝ : r u ≠ 0
ha : r u + ↑(b u) * q u = ↑(a u) := rq_eq u
hr : r u - 1 + 1 = r u := Eq.trans (add_comm (r u - 1) 1) (add_tsub_cancel_of_le (Nat.pos_of_ne_zero hr✝))
⊢ (u.y * q u + ↑(z u)) * ↑(b u) + u.y * (r u - 1 + 1) = u.y * ↑(a u) + ↑(z u) * ↑(b u)

tactic: ring
state_before: case h₁
u : XgcdType
hr✝ : r u ≠ 0
ha : r u + ↑(b u) * q u = ↑(a u) := rq_eq u
hr : r u - 1 + 1 = r u := Eq.trans (add_comm (r u - 1) 1) (add_tsub_cancel_of_le (Nat.pos_of_ne_zero hr✝))
⊢ (u.y * q u + ↑(z u)) * ↑(b u) + u.y * r u = u.y * (r u + ↑(b u) * q u) + ↑(z u) * ↑(b u)

tactic: change ((u.w * u.q + u.x) * u.b + u.w * (u.r - 1 + 1) : ℕ) = u.w * u.a + u.x * u.b
state_before: case h₂
u : XgcdType
hr✝ : r u ≠ 0
ha : r u + ↑(b u) * q u = ↑(a u) := rq_eq u
hr : r u - 1 + 1 = r u := Eq.trans (add_comm (r u - 1) 1) (add_tsub_cancel_of_le (Nat.pos_of_ne_zero hr✝))
⊢ (v (step u)).snd = (Prod.swap (v u)).snd

tactic: rw [← ha, hr]
state_before: case h₂
u : XgcdType
hr✝ : r u ≠ 0
ha : r u + ↑(b u) * q u = ↑(a u) := rq_eq u
hr : r u - 1 + 1 = r u := Eq.trans (add_comm (r u - 1) 1) (add_tsub_cancel_of_le (Nat.pos_of_ne_zero hr✝))
⊢ (↑(w u) * q u + u.x) * ↑(b u) + ↑(w u) * (r u - 1 + 1) = ↑(w u) * ↑(a u) + u.x * ↑(b u)

tactic: ring
state_before: case h₂
u : XgcdType
hr✝ : r u ≠ 0
ha : r u + ↑(b u) * q u = ↑(a u) := rq_eq u
hr : r u - 1 + 1 = r u := Eq.trans (add_comm (r u - 1) 1) (add_tsub_cancel_of_le (Nat.pos_of_ne_zero hr✝))
⊢ (↑(w u) * q u + u.x) * ↑(b u) + ↑(w u) * r u = ↑(w u) * (r u + ↑(b u) * q u) + u.x * ↑(b u)
Theorem: Set.compl_cIcc
File: Mathlib/Order/Circular.lean

tactic: ext
state_before: α : Type u_1
inst✝ : CircularOrder α
a b : α
⊢ cIcc a bᶜ = cIoo b a

tactic: rw [Set.mem_cIoo, sbtw_iff_not_btw]
state_before: case h
α : Type u_1
inst✝ : CircularOrder α
a b x✝ : α
⊢ x✝ ∈ cIcc a bᶜ ↔ x✝ ∈ cIoo b a

tactic: rfl
state_before: case h
α : Type u_1
inst✝ : CircularOrder α
a b x✝ : α
⊢ x✝ ∈ cIcc a bᶜ ↔ ¬btw a x✝ b
Theorem: smul_closedBall''
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: ext
state_before: 𝓕 : Type ?u.1003367
𝕜 : Type ?u.1003370
α : Type ?u.1003373
ι : Type ?u.1003376
κ : Type ?u.1003379
E : Type u_1
F : Type ?u.1003385
G : Type ?u.1003388
inst✝¹ : SeminormedCommGroup E
inst✝ : SeminormedCommGroup F
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
⊢ a • closedBall b r = closedBall (a • b) r

tactic: simp [mem_closedBall, Set.mem_smul_set, dist_eq_norm_div, _root_.div_eq_inv_mul, ←
  eq_inv_mul_iff_mul_eq, mul_assoc]
state_before: case h
𝓕 : Type ?u.1003367
𝕜 : Type ?u.1003370
α : Type ?u.1003373
ι : Type ?u.1003376
κ : Type ?u.1003379
E : Type u_1
F : Type ?u.1003385
G : Type ?u.1003388
inst✝¹ : SeminormedCommGroup E
inst✝ : SeminormedCommGroup F
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
x✝ : E
⊢ x✝ ∈ a • closedBall b r ↔ x✝ ∈ closedBall (a • b) r
Theorem: Nat.factorization_eq_card_pow_dvd
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: simp [← Icc_factorization_eq_pow_dvd n pp]
state_before: n p : ℕ
pp : Prime p
⊢ ↑(factorization n) p = card (Finset.filter (fun i => p ^ i ∣ n) (Ico 1 n))
Theorem: LaurentPolynomial.support_C_mul_T_of_ne_zero
File: Mathlib/Data/Polynomial/Laurent.lean

tactic: rw [← single_eq_C_mul_T]
state_before: R : Type u_1
inst✝ : Semiring R
a : R
a0 : a ≠ 0
n : ℤ
⊢ (↑C a * T n).support = {n}

tactic: exact support_single_ne_zero _ a0
state_before: R : Type u_1
inst✝ : Semiring R
a : R
a0 : a ≠ 0
n : ℤ
⊢ (Finsupp.single n a).support = {n}
Theorem: Combinatorics.Line.vertical_apply
File: Mathlib/Combinatorics/HalesJewett.lean

tactic: funext i
state_before: α : Type u_1
ι : Type u_2
ι' : Type u_3
v : ι → α
l : Line α ι'
x : α
⊢ (fun x i => Option.getD (idxFun (vertical v l) i) x) x = Sum.elim v ((fun x i => Option.getD (idxFun l i) x) x)

tactic: cases i <;> rfl
state_before: case h
α : Type u_1
ι : Type u_2
ι' : Type u_3
v : ι → α
l : Line α ι'
x : α
i : ι ⊕ ι'
⊢ (fun x i => Option.getD (idxFun (vertical v l) i) x) x i = Sum.elim v ((fun x i => Option.getD (idxFun l i) x) x) i
Theorem: Rat.floor_int_div_nat_eq_div
File: Mathlib/Data/Rat/Floor.lean

tactic: rw [Rat.floor_def]
state_before: α : Type ?u.3373
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
n : ℤ
d : ℕ
⊢ ⌊↑n / ↑d⌋ = n / ↑d

tactic: obtain rfl | hd := @eq_zero_or_pos _ _ d
state_before: α : Type ?u.3373
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
n : ℤ
d : ℕ
⊢ (↑n / ↑d).num / ↑(↑n / ↑d).den = n / ↑d

tactic: set q := (n : ℚ) / d with q_eq
state_before: case inr
α : Type ?u.3373
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
n : ℤ
d : ℕ
hd : 0 < d
⊢ (↑n / ↑d).num / ↑(↑n / ↑d).den = n / ↑d

tactic: obtain ⟨c, n_eq_c_mul_num, d_eq_c_mul_denom⟩ : ∃ c, n = c * q.num ∧ (d : ℤ) = c * q.den := by
  rw [q_eq]
  exact_mod_cast @Rat.exists_eq_mul_div_num_and_eq_mul_div_den n d (by exact_mod_cast hd.ne')
state_before: case inr
α : Type ?u.3373
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
n : ℤ
d : ℕ
hd : 0 < d
q : ℚ := ↑n / ↑d
q_eq : q = ↑n / ↑d
⊢ q.num / ↑q.den = n / ↑d

tactic: rw [n_eq_c_mul_num, d_eq_c_mul_denom]
state_before: case inr.intro.intro
α : Type ?u.3373
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
n : ℤ
d : ℕ
hd : 0 < d
q : ℚ := ↑n / ↑d
q_eq : q = ↑n / ↑d
c : ℤ
n_eq_c_mul_num : n = c * q.num
d_eq_c_mul_denom : ↑d = c * ↑q.den
⊢ q.num / ↑q.den = n / ↑d

tactic: refine' (Int.mul_ediv_mul_of_pos _ _ <| pos_of_mul_pos_left _ <| Int.coe_nat_nonneg q.den).symm
state_before: case inr.intro.intro
α : Type ?u.3373
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
n : ℤ
d : ℕ
hd : 0 < d
q : ℚ := ↑n / ↑d
q_eq : q = ↑n / ↑d
c : ℤ
n_eq_c_mul_num : n = c * q.num
d_eq_c_mul_denom : ↑d = c * ↑q.den
⊢ q.num / ↑q.den = c * q.num / (c * ↑q.den)

tactic: rwa [← d_eq_c_mul_denom, Int.coe_nat_pos]
state_before: case inr.intro.intro
α : Type ?u.3373
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
n : ℤ
d : ℕ
hd : 0 < d
q : ℚ := ↑n / ↑d
q_eq : q = ↑n / ↑d
c : ℤ
n_eq_c_mul_num : n = c * q.num
d_eq_c_mul_denom : ↑d = c * ↑q.den
⊢ 0 < c * ↑q.den

tactic: simp
state_before: case inl
α : Type ?u.3373
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
n : ℤ
⊢ (↑n / ↑0).num / ↑(↑n / ↑0).den = n / ↑0

tactic: rw [q_eq]
state_before: α : Type ?u.3373
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
n : ℤ
d : ℕ
hd : 0 < d
q : ℚ := ↑n / ↑d
q_eq : q = ↑n / ↑d
⊢ ∃ c, n = c * q.num ∧ ↑d = c * ↑q.den

tactic: exact_mod_cast @Rat.exists_eq_mul_div_num_and_eq_mul_div_den n d (by exact_mod_cast hd.ne')
state_before: α : Type ?u.3373
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
n : ℤ
d : ℕ
hd : 0 < d
q : ℚ := ↑n / ↑d
q_eq : q = ↑n / ↑d
⊢ ∃ c, n = c * (↑n / ↑d).num ∧ ↑d = c * ↑(↑n / ↑d).den

tactic: exact_mod_cast hd.ne'
state_before: α : Type ?u.3373
inst✝¹ : LinearOrderedField α
inst✝ : FloorRing α
n : ℤ
d : ℕ
hd : 0 < d
q : ℚ := ↑n / ↑d
q_eq : q = ↑n / ↑d
⊢ ↑d ≠ 0
Theorem: stronglyMeasurable_derivWithin_Ici
File: Mathlib/Analysis/Calculus/FDerivMeasurable.lean

tactic: borelize F
state_before: F : Type u_1
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝¹ : CompleteSpace F
inst✝ : SecondCountableTopology F
⊢ StronglyMeasurable fun x => derivWithin f (Ici x) x

tactic: exact (measurable_derivWithin_Ici f).stronglyMeasurable
state_before: F : Type u_1
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝¹ : CompleteSpace F
inst✝ : SecondCountableTopology F
this✝¹ : MeasurableSpace F := borel F
this✝ : BorelSpace F
⊢ StronglyMeasurable fun x => derivWithin f (Ici x) x
Theorem: Except.map_id
File: src/lean/Init/Control/Except.lean

tactic: apply funext
state_before: ε : Type u
α : Type u_1
⊢ Except.map id = id

tactic: intro e
state_before: case h
ε : Type u
α : Type u_1
⊢ ∀ (x : Except ε α), Except.map id x = id x

tactic: simp [Except.map]
state_before: case h
ε : Type u
α : Type u_1
e : Except ε α
⊢ Except.map id e = id e

tactic: cases e <;> rfl
state_before: case h
ε : Type u
α : Type u_1
e : Except ε α
⊢ (match e with
    | error err => error err
    | ok v => ok v) =
    e
Theorem: Submodule.fg_of_fg_map_injective
File: Mathlib/RingTheory/Finiteness.lean

tactic: rw [f.map_span, Finset.coe_preimage, Set.image_preimage_eq_inter_range,
  Set.inter_eq_self_of_subset_left, ht]
state_before: R : Type u_1
M : Type u_2
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
P : Type u_3
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
f✝ f : M →ₗ[R] P
hf : Function.Injective ↑f
N : Submodule R M
hfn : FG (map f N)
t : Finset P
ht : span R ↑t = map f N
⊢ map f
      (span R ↑(Finset.preimage t ↑f (_ : ∀ (x : M), x ∈ ↑f ⁻¹' ↑t → ∀ (y : M), y ∈ ↑f ⁻¹' ↑t → ↑f x = ↑f y → x = y))) =
    map f N

tactic: rw [← LinearMap.range_coe, ← span_le, ht, ← map_top]
state_before: R : Type u_1
M : Type u_2
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
P : Type u_3
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
f✝ f : M →ₗ[R] P
hf : Function.Injective ↑f
N : Submodule R M
hfn : FG (map f N)
t : Finset P
ht : span R ↑t = map f N
⊢ ↑t ⊆ range ↑f

tactic: exact map_mono le_top
state_before: R : Type u_1
M : Type u_2
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
P : Type u_3
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
f✝ f : M →ₗ[R] P
hf : Function.Injective ↑f
N : Submodule R M
hfn : FG (map f N)
t : Finset P
ht : span R ↑t = map f N
⊢ map f N ≤ map f ⊤
Theorem: intervalIntegral.norm_intervalIntegral_eq
File: Mathlib/MeasureTheory/Integral/IntervalIntegral.lean

tactic: simp_rw [intervalIntegral_eq_integral_uIoc, norm_smul]
state_before: ι : Type ?u.10290574
𝕜 : Type ?u.10290577
E : Type u_1
F : Type ?u.10290583
A : Type ?u.10290586
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
a✝ b✝ : ℝ
f✝ g : ℝ → E
μ✝ : MeasureTheory.Measure ℝ
f : ℝ → E
a b : ℝ
μ : MeasureTheory.Measure ℝ
⊢ ‖∫ (x : ℝ) in a..b, f x ∂μ‖ = ‖∫ (x : ℝ) in Ι a b, f x ∂μ‖

tactic: split_ifs <;> simp only [norm_neg, norm_one, one_mul]
state_before: ι : Type ?u.10290574
𝕜 : Type ?u.10290577
E : Type u_1
F : Type ?u.10290583
A : Type ?u.10290586
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
a✝ b✝ : ℝ
f✝ g : ℝ → E
μ✝ : MeasureTheory.Measure ℝ
f : ℝ → E
a b : ℝ
μ : MeasureTheory.Measure ℝ
⊢ ‖if a ≤ b then 1 else -1‖ * ‖∫ (x : ℝ) in Ι a b, f x ∂μ‖ = ‖∫ (x : ℝ) in Ι a b, f x ∂μ‖
Theorem: and_or_right
File: Std/Logic.lean

tactic: simp [or_comm, or_and_left]
state_before: a b c : Prop
⊢ a ∧ b ∨ c ↔ (a ∨ c) ∧ (b ∨ c)
Theorem: MeasureTheory.OuterMeasure.restrict_apply
File: Mathlib/MeasureTheory/Measure/OuterMeasure.lean

tactic: simp [restrict]
state_before: α : Type u_1
β : Type ?u.99043
R : Type ?u.99046
R' : Type ?u.99049
ms : Set (OuterMeasure α)
m✝ : OuterMeasure α
s t : Set α
m : OuterMeasure α
⊢ ↑(↑(restrict s) m) t = ↑m (t ∩ s)
Theorem: Sum.lex_inl_inl
File: Mathlib/Data/Sum/Basic.lean

tactic: cases h
state_before: α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type ?u.28297
δ : Type ?u.28300
r r₁ r₂ : α → α → Prop
s s₁ s₂ : β → β → Prop
a a₁ a₂ : α
b b₁ b₂ : β
x y : α ⊕ β
h : Lex r s (inl a₁) (inl a₂)
⊢ r a₁ a₂

tactic: assumption
state_before: case inl
α : Type u
α' : Type w
β : Type v
β' : Type x
γ : Type ?u.28297
δ : Type ?u.28300
r r₁ r₂ : α → α → Prop
s s₁ s₂ : β → β → Prop
a a₁ a₂ : α
b b₁ b₂ : β
x y : α ⊕ β
h✝ : r a₁ a₂
⊢ r a₁ a₂
Theorem: Mathlib.Meta.NormNum.minFacHelper_1
File: Mathlib/Tactic/NormNum/Prime.lean

tactic: rw [← e]
state_before: n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
⊢ MinFacHelper n k'

tactic: refine ⟨Nat.lt_add_right _ _ _ h.1, ?_, ?_⟩
state_before: n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
⊢ MinFacHelper n (k + 2)

tactic: rcases h.2.2.eq_or_lt with rfl|h2
state_before: case refine_2
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
⊢ k + 2 ≤ minFac n

tactic: rcases (succ_le_of_lt h2).eq_or_lt with h2|h2
state_before: case refine_2.inr
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
h2 : k < minFac n
⊢ k + 2 ≤ minFac n

tactic: exact h2
state_before: case refine_2.inr.inr
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
h2✝ : k < minFac n
h2 : succ k < minFac n
⊢ k + 2 ≤ minFac n

tactic: rw [add_mod, mod_self, add_zero, mod_mod]
state_before: case refine_1
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
⊢ (k + 2) % 2 = 1

tactic: exact h.2.1
state_before: case refine_1
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
⊢ k % 2 = 1

tactic: exact (np rfl).elim
state_before: case refine_2.inl
n k' : ℕ
e : minFac n + 2 = k'
h : MinFacHelper n (minFac n)
np : minFac n ≠ minFac n
⊢ minFac n + 2 ≤ minFac n

tactic: refine ((h.1.trans_le h.2.2).ne ?_).elim
state_before: case refine_2.inr.inl
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
h2✝ : k < minFac n
h2 : succ k = minFac n
⊢ k + 2 ≤ minFac n

tactic: have h3 : 2 ∣ minFac n
state_before: case refine_2.inr.inl
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
h2✝ : k < minFac n
h2 : succ k = minFac n
⊢ 2 = minFac n

tactic: rw [dvd_prime <| minFac_prime h.one_lt.ne'] at h3
state_before: case refine_2.inr.inl
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
h2✝ : k < minFac n
h2 : succ k = minFac n
h3 : 2 ∣ minFac n
⊢ 2 = minFac n

tactic: norm_num at h3
state_before: case refine_2.inr.inl
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
h2✝ : k < minFac n
h2 : succ k = minFac n
h3 : 2 = 1 ∨ 2 = minFac n
⊢ 2 = minFac n

tactic: exact h3
state_before: case refine_2.inr.inl
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
h2✝ : k < minFac n
h2 : succ k = minFac n
h3 : 2 = minFac n
⊢ 2 = minFac n

tactic: rw [Nat.dvd_iff_mod_eq_zero, ← h2, succ_eq_add_one, add_mod, h.2.1]
state_before: case h3
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
h2✝ : k < minFac n
h2 : succ k = minFac n
⊢ 2 ∣ minFac n

tactic: norm_num
state_before: case h3
n k k' : ℕ
e : k + 2 = k'
h : MinFacHelper n k
np : minFac n ≠ k
h2✝ : k < minFac n
h2 : succ k = minFac n
⊢ (1 + 1 % 2) % 2 = 0
Theorem: List.prod_cons
File: Mathlib/Data/List/BigOperators/Basic.lean

tactic: simp only [List.prod, foldl_cons, one_mul, mul_one]
state_before: ι : Type ?u.1915
α : Type ?u.1918
M : Type u_1
N : Type ?u.1924
P : Type ?u.1927
M₀ : Type ?u.1930
G : Type ?u.1933
R : Type ?u.1936
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : Monoid P
l l₁ l₂ : List M
a : M
⊢ prod (a :: l) = foldl (fun x x_1 => x * x_1) (a * 1) l
Theorem: Set.div_mem_center
File: Mathlib/GroupTheory/Subsemigroup/Center.lean

tactic: rw [div_eq_mul_inv]
state_before: M : Type u_1
inst✝ : Group M
a b : M
ha : a ∈ center M
hb : b ∈ center M
⊢ a / b ∈ center M

tactic: exact mul_mem_center ha (inv_mem_center hb)
state_before: M : Type u_1
inst✝ : Group M
a b : M
ha : a ∈ center M
hb : b ∈ center M
⊢ a * b⁻¹ ∈ center M
Theorem: Lists.Equiv.symm
File: Mathlib/SetTheory/Lists.lean

tactic: cases' h with _ _ _ h₁ h₂ <;> [rfl; exact Equiv.antisymm h₂ h₁]
state_before: α : Type u_1
l₁ l₂ : Lists α
h : l₁ ~ l₂
⊢ l₂ ~ l₁
Theorem: List.get_rotate
File: Mathlib/Data/List/Rotate.lean

tactic: rw [← Option.some_inj, ← get?_eq_get, ← get?_eq_get, get?_rotate]
state_before: α : Type u
l : List α
n : ℕ
k : Fin (length (rotate l n))
⊢ get (rotate l n) k = get l { val := (↑k + n) % length l, isLt := (_ : (↑k + n) % length l < length l) }

tactic: exact k.2.trans_eq (length_rotate _ _)
state_before: α : Type u
l : List α
n : ℕ
k : Fin (length (rotate l n))
⊢ ↑k < length l