tasksource/leandojo huggingface dataset:
Theorem: Turing.PartrecToTM2.codeSupp_fix
File: Mathlib/Computability/TMToPartrec.lean

tactic: simp [codeSupp, codeSupp', contSupp, Finset.union_assoc, Finset.union_left_comm,
  Finset.union_left_idem]
state_before: f : Code
k : Cont'
⊢ codeSupp (Code.fix f) k = trStmts₁ (trNormal (Code.fix f) k) ∪ codeSupp f (Cont'.fix f k)
Theorem: Filter.Eventually.diag_of_prod
File: Mathlib/Order/Filter/Prod.lean

tactic: obtain ⟨t, ht, s, hs, hst⟩ := eventually_prod_iff.1 h
state_before: α : Type u_1
β : Type ?u.9533
γ : Type ?u.9536
δ : Type ?u.9539
ι : Sort ?u.9542
s : Set α
t : Set β
f✝ : Filter α
g : Filter β
f : Filter α
p : α × α → Prop
h : ∀ᶠ (i : α × α) in f ×ˢ f, p i
⊢ ∀ᶠ (i : α) in f, p (i, i)

tactic: apply (ht.and hs).mono fun x hx => hst hx.1 hx.2
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type ?u.9533
γ : Type ?u.9536
δ : Type ?u.9539
ι : Sort ?u.9542
s✝ : Set α
t✝ : Set β
f✝ : Filter α
g : Filter β
f : Filter α
p : α × α → Prop
h : ∀ᶠ (i : α × α) in f ×ˢ f, p i
t : α → Prop
ht : ∀ᶠ (x : α) in f, t x
s : α → Prop
hs : ∀ᶠ (y : α) in f, s y
hst : ∀ {x : α}, t x → ∀ {y : α}, s y → p (x, y)
⊢ ∀ᶠ (i : α) in f, p (i, i)
Theorem: Polynomial.coeff_det_X_add_C_zero
File: Mathlib/LinearAlgebra/Matrix/Polynomial.lean

tactic: rw [det_apply, finset_sum_coeff, det_apply]
state_before: n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
⊢ coeff (det (X • Matrix.map A ↑C + Matrix.map B ↑C)) 0 = det B

tactic: refine' Finset.sum_congr rfl _
state_before: n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
⊢ ∑ b : Equiv.Perm n, coeff (↑sign b • ∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑b i) i) 0 =
    ∑ σ : Equiv.Perm n, ↑sign σ • ∏ i : n, B (↑σ i) i

tactic: rintro g -
state_before: n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
⊢ ∀ (x : Equiv.Perm n),
    x ∈ Finset.univ →
      coeff (↑sign x • ∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑x i) i) 0 = ↑sign x • ∏ i : n, B (↑x i) i

tactic: convert coeff_smul (R := α) (sign g) _ 0
state_before: n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
g : Equiv.Perm n
⊢ coeff (↑sign g • ∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g i) i) 0 = ↑sign g • ∏ i : n, B (↑g i) i

tactic: rw [coeff_zero_prod]
state_before: case h.e'_3.h.e'_6
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
g : Equiv.Perm n
⊢ ∏ i : n, B (↑g i) i = coeff (∏ i : n, (X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g i) i) 0

tactic: refine' Finset.prod_congr rfl _
state_before: case h.e'_3.h.e'_6
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
g : Equiv.Perm n
⊢ ∏ i : n, B (↑g i) i = ∏ i : n, coeff ((X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g i) i) 0

tactic: simp
state_before: case h.e'_3.h.e'_6
n : Type u_1
α : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
inst✝ : CommRing α
A B : Matrix n n α
g : Equiv.Perm n
⊢ ∀ (x : n), x ∈ Finset.univ → B (↑g x) x = coeff ((X • Matrix.map A ↑C + Matrix.map B ↑C) (↑g x) x) 0
Theorem: Set.ncard_eq_ofBijective
File: Mathlib/Data/Set/Ncard.lean

tactic: rw [ncard_eq_toFinset_card _ hs]
state_before: α : Type u_1
β : Type ?u.71917
s t : Set α
a b x y : α
f✝ : α → β
n : ℕ
f : (i : ℕ) → i < n → α
hf : ∀ (a : α), a ∈ s → ∃ i h, f i h = a
hf' : ∀ (i : ℕ) (h : i < n), f i h ∈ s
f_inj : ∀ (i j : ℕ) (hi : i < n) (hj : j < n), f i hi = f j hj → i = j
hs : autoParam (Set.Finite s) _auto✝
⊢ ncard s = n

tactic: apply Finset.card_eq_of_bijective
state_before: α : Type u_1
β : Type ?u.71917
s t : Set α
a b x y : α
f✝ : α → β
n : ℕ
f : (i : ℕ) → i < n → α
hf : ∀ (a : α), a ∈ s → ∃ i h, f i h = a
hf' : ∀ (i : ℕ) (h : i < n), f i h ∈ s
f_inj : ∀ (i j : ℕ) (hi : i < n) (hj : j < n), f i hi = f j hj → i = j
hs : autoParam (Set.Finite s) _auto✝
⊢ Finset.card (Finite.toFinset hs) = n

tactic: all_goals simpa
state_before: case hf
α : Type u_1
β : Type ?u.71917
s t : Set α
a b x y : α
f✝ : α → β
n : ℕ
f : (i : ℕ) → i < n → α
hf : ∀ (a : α), a ∈ s → ∃ i h, f i h = a
hf' : ∀ (i : ℕ) (h : i < n), f i h ∈ s
f_inj : ∀ (i j : ℕ) (hi : i < n) (hj : j < n), f i hi = f j hj → i = j
hs : autoParam (Set.Finite s) _auto✝
⊢ ∀ (a : α), a ∈ Finite.toFinset hs → ∃ i h, ?f i h = a

case hf'
α : Type u_1
β : Type ?u.71917
s t : Set α
a b x y : α
f✝ : α → β
n : ℕ
f : (i : ℕ) → i < n → α
hf : ∀ (a : α), a ∈ s → ∃ i h, f i h = a
hf' : ∀ (i : ℕ) (h : i < n), f i h ∈ s
f_inj : ∀ (i j : ℕ) (hi : i < n) (hj : j < n), f i hi = f j hj → i = j
hs : autoParam (Set.Finite s) _auto✝
⊢ ∀ (i : ℕ) (h : i < n), ?f i h ∈ Finite.toFinset hs

case f_inj
α : Type u_1
β : Type ?u.71917
s t : Set α
a b x y : α
f✝ : α → β
n : ℕ
f : (i : ℕ) → i < n → α
hf : ∀ (a : α), a ∈ s → ∃ i h, f i h = a
hf' : ∀ (i : ℕ) (h : i < n), f i h ∈ s
f_inj : ∀ (i j : ℕ) (hi : i < n) (hj : j < n), f i hi = f j hj → i = j
hs : autoParam (Set.Finite s) _auto✝
⊢ ∀ (i j : ℕ) (hi : i < n) (hj : j < n), ?f i hi = ?f j hj → i = j

case f
α : Type u_1
β : Type ?u.71917
s t : Set α
a b x y : α
f✝ : α → β
n : ℕ
f : (i : ℕ) → i < n → α
hf : ∀ (a : α), a ∈ s → ∃ i h, f i h = a
hf' : ∀ (i : ℕ) (h : i < n), f i h ∈ s
f_inj : ∀ (i j : ℕ) (hi : i < n) (hj : j < n), f i hi = f j hj → i = j
hs : autoParam (Set.Finite s) _auto✝
⊢ (i : ℕ) → i < n → α

tactic: simpa
state_before: case f_inj
α : Type u_1
β : Type ?u.71917
s t : Set α
a b x y : α
f✝ : α → β
n : ℕ
f : (i : ℕ) → i < n → α
hf : ∀ (a : α), a ∈ s → ∃ i h, f i h = a
hf' : ∀ (i : ℕ) (h : i < n), f i h ∈ s
f_inj : ∀ (i j : ℕ) (hi : i < n) (hj : j < n), f i hi = f j hj → i = j
hs : autoParam (Set.Finite s) _auto✝
⊢ ∀ (i j : ℕ) (hi : i < n) (hj : j < n), f i hi = f j hj → i = j
Theorem: smul_le_smul_iff_of_neg
File: Mathlib/Algebra/Order/Module.lean

tactic: rw [← neg_neg c, neg_smul, neg_smul (-c), neg_le_neg_iff]
state_before: k : Type u_1
M : Type u_2
N : Type ?u.89573
inst✝³ : LinearOrderedField k
inst✝² : OrderedAddCommGroup M
inst✝¹ : Module k M
inst✝ : OrderedSMul k M
a b : M
c : k
hc : c < 0
⊢ c • a ≤ c • b ↔ b ≤ a

tactic: exact smul_le_smul_iff_of_pos (neg_pos_of_neg hc)
state_before: k : Type u_1
M : Type u_2
N : Type ?u.89573
inst✝³ : LinearOrderedField k
inst✝² : OrderedAddCommGroup M
inst✝¹ : Module k M
inst✝ : OrderedSMul k M
a b : M
c : k
hc : c < 0
⊢ -c • b ≤ -c • a ↔ b ≤ a
Theorem: Num.cast_ofZNum
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [← cast_to_nat, ofZNum_toNat]
state_before: α : Type u_1
inst✝ : AddGroupWithOne α
n : ZNum
⊢ ↑(ofZNum n) = ↑(toNat ↑n)
Theorem: Int.lt_of_add_lt_add_left
File: Std/Data/Int/Lemmas.lean

tactic: have : -a + (a + b) < -a + (a + c) := Int.add_lt_add_left h _
state_before: a b c : Int
h : a + b < a + c
⊢ b < c

tactic: simp [Int.neg_add_cancel_left] at this
state_before: a b c : Int
h : a + b < a + c
this : -a + (a + b) < -a + (a + c)
⊢ b < c

tactic: assumption
state_before: a b c : Int
h : a + b < a + c
this : b < c
⊢ b < c
Theorem: Int.csInf_of_not_bdd_below
File: Mathlib/Data/Int/ConditionallyCompleteOrder.lean

tactic: simp [h]
state_before: s : Set ℤ
h : ¬BddBelow s
⊢ ¬(Set.Nonempty s ∧ BddBelow s)
Theorem: Multiset.prod_hom₂
File: Mathlib/Algebra/BigOperators/Multiset/Basic.lean

tactic: simp only [l.prod_hom₂ f hf hf', quot_mk_to_coe, coe_map, coe_prod]
state_before: ι : Type u_3
α : Type u_4
β : Type u_1
γ : Type u_2
inst✝² : CommMonoid α
s✝ t : Multiset α
a : α
m : Multiset ι
f✝ g : ι → α
inst✝¹ : CommMonoid β
inst✝ : CommMonoid γ
s : Multiset ι
f : α → β → γ
hf : ∀ (a b : α) (c d : β), f (a * b) (c * d) = f a c * f b d
hf' : f 1 1 = 1
f₁ : ι → α
f₂ : ι → β
l : List ι
⊢ prod (map (fun i => f (f₁ i) (f₂ i)) (Quotient.mk (List.isSetoid ι) l)) =
    f (prod (map f₁ (Quotient.mk (List.isSetoid ι) l))) (prod (map f₂ (Quotient.mk (List.isSetoid ι) l)))
Theorem: MeasureTheory.lintegral_insert
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: rw [← union_singleton, lintegral_union (measurableSet_singleton a), lintegral_singleton,
  add_comm]
state_before: α : Type u_1
β : Type ?u.1731961
γ : Type ?u.1731964
δ : Type ?u.1731967
m : MeasurableSpace α
μ ν : Measure α
inst✝ : MeasurableSingletonClass α
a : α
s : Set α
h : ¬a ∈ s
f : α → ℝ≥0∞
⊢ (∫⁻ (x : α) in insert a s, f x ∂μ) = f a * ↑↑μ {a} + ∫⁻ (x : α) in s, f x ∂μ

tactic: rwa [disjoint_singleton_right]
state_before: α : Type u_1
β : Type ?u.1731961
γ : Type ?u.1731964
δ : Type ?u.1731967
m : MeasurableSpace α
μ ν : Measure α
inst✝ : MeasurableSingletonClass α
a : α
s : Set α
h : ¬a ∈ s
f : α → ℝ≥0∞
⊢ Disjoint s {a}
Theorem: Std.PairingHeapImp.Heap.size_tail?_lt
File: Std/Data/PairingHeap.lean

tactic: simp only [Heap.tail?]
state_before: α : Type u_1
le : α → α → Bool
s' s : Heap α
⊢ tail? le s = some s' → size s' < size s

tactic: intro eq
state_before: α : Type u_1
le : α → α → Bool
s' s : Heap α
⊢ Option.map (fun x => x.snd) (deleteMin le s) = some s' → size s' < size s

tactic: match eq₂ : s.deleteMin le, eq with
| some (a, tl), rfl => exact size_deleteMin_lt eq₂
state_before: α : Type u_1
le : α → α → Bool
s' s : Heap α
eq : Option.map (fun x => x.snd) (deleteMin le s) = some s'
⊢ size s' < size s

tactic: exact size_deleteMin_lt eq₂
state_before: α : Type u_1
le : α → α → Bool
s' s : Heap α
eq : Option.map (fun x => x.snd) (deleteMin le s) = some s'
a : α
tl : Heap α
eq₂ : deleteMin le s = some (a, tl)
⊢ size ((fun x => x.snd) (a, tl)) < size s
Theorem: CauSeq.mul_equiv_zero
File: Mathlib/Data/Real/CauSeq.lean

tactic: simpa
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
g f : CauSeq β abv
hf : f ≈ 0
this : LimZero (f - 0)
⊢ LimZero f

tactic: simpa
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
g f : CauSeq β abv
hf : f ≈ 0
this✝ : LimZero (f - 0)
this : LimZero (g * f)
⊢ LimZero (g * f - 0)
Theorem: Function.exists_update_iff
File: Mathlib/Logic/Function/Basic.lean

tactic: rw [← not_forall_not, forall_update_iff f fun a b ↦ ¬p a b]
state_before: α : Sort u
β : α → Sort v
α' : Sort w
inst✝¹ : DecidableEq α
inst✝ : DecidableEq α'
f✝ g : (a : α) → β a
a✝ : α
b✝ : β a✝
f : (a : α) → β a
a : α
b : β a
p : (a : α) → β a → Prop
⊢ (∃ x, p x (update f a b x)) ↔ p a b ∨ ∃ x x_1, p x (f x)

tactic: simp [-not_and, not_and_or]
state_before: α : Sort u
β : α → Sort v
α' : Sort w
inst✝¹ : DecidableEq α
inst✝ : DecidableEq α'
f✝ g : (a : α) → β a
a✝ : α
b✝ : β a✝
f : (a : α) → β a
a : α
b : β a
p : (a : α) → β a → Prop
⊢ ¬(¬p a b ∧ ∀ (x : α), x ≠ a → ¬p x (f x)) ↔ p a b ∨ ∃ x x_1, p x (f x)
Theorem: Semiquot.ext_s
File: Mathlib/Data/Semiquot.lean

tactic: refine' ⟨congr_arg _, fun h => _⟩
state_before: α : Type u_1
β : Type ?u.885
q₁ q₂ : Semiquot α
⊢ q₁ = q₂ ↔ q₁.s = q₂.s

tactic: cases' q₁ with _ v₁
state_before: α : Type u_1
β : Type ?u.885
q₁ q₂ : Semiquot α
h : q₁.s = q₂.s
⊢ q₁ = q₂

tactic: cases' q₂ with _ v₂
state_before: case mk'
α : Type u_1
β : Type ?u.885
q₂ : Semiquot α
s✝ : Set α
v₁ : Trunc ↑s✝
h : { s := s✝, val := v₁ }.s = q₂.s
⊢ { s := s✝, val := v₁ } = q₂

tactic: congr
state_before: case mk'.mk'
α : Type u_1
β : Type ?u.885
s✝¹ : Set α
v₁ : Trunc ↑s✝¹
s✝ : Set α
v₂ : Trunc ↑s✝
h : { s := s✝¹, val := v₁ }.s = { s := s✝, val := v₂ }.s
⊢ { s := s✝¹, val := v₁ } = { s := s✝, val := v₂ }

tactic: exact Subsingleton.helim (congrArg Trunc (congrArg Set.Elem h)) v₁ v₂
state_before: case mk'.mk'.h.e_3
α : Type u_1
β : Type ?u.885
s✝¹ : Set α
v₁ : Trunc ↑s✝¹
s✝ : Set α
v₂ : Trunc ↑s✝
h : { s := s✝¹, val := v₁ }.s = { s := s✝, val := v₂ }.s
⊢ HEq v₁ v₂
Theorem: IsScalarTower.of_smul_one_mul
File: Mathlib/GroupTheory/GroupAction/Defs.lean

tactic: rw [← h, smul_eq_mul, mul_assoc, h, smul_eq_mul]
state_before: M✝ : Type ?u.29021
N✝ : Type ?u.29024
G : Type ?u.29027
A : Type ?u.29030
B : Type ?u.29033
α : Type ?u.29036
β : Type ?u.29039
γ : Type ?u.29042
δ : Type ?u.29045
M : Type u_1
N : Type u_2
inst✝¹ : Monoid N
inst✝ : SMul M N
h : ∀ (x : M) (y : N), x • 1 * y = x • y
x : M
y z : N
⊢ (x • y) • z = x • y • z
Theorem: even_neg_two
File: Mathlib/Algebra/Parity.lean

tactic: simp only [even_neg, even_two]
state_before: F : Type ?u.101304
α : Type u_1
β : Type ?u.101310
R : Type ?u.101313
inst✝ : Ring α
a b : α
n : ℕ
⊢ Even (-2)
Theorem: Ring.eq_mul_inverse_iff_mul_eq
File: Mathlib/Algebra/GroupWithZero/Units/Basic.lean

tactic: rw [h1, inverse_mul_cancel_right _ _ h]
state_before: α : Type ?u.8485
M₀ : Type u_1
G₀ : Type ?u.8491
M₀' : Type ?u.8494
G₀' : Type ?u.8497
F : Type ?u.8500
F' : Type ?u.8503
inst✝ : MonoidWithZero M₀
x y z : M₀
h : IsUnit z
h1 : x = y * inverse z
⊢ x * z = y

tactic: rw [← h1, mul_inverse_cancel_right _ _ h]
state_before: α : Type ?u.8485
M₀ : Type u_1
G₀ : Type ?u.8491
M₀' : Type ?u.8494
G₀' : Type ?u.8497
F : Type ?u.8500
F' : Type ?u.8503
inst✝ : MonoidWithZero M₀
x y z : M₀
h : IsUnit z
h1 : x * z = y
⊢ x = y * inverse z
Theorem: Set.univ_pi_update_univ
File: Mathlib/Data/Set/Prod.lean

tactic: rw [univ_pi_update i (fun j => (univ : Set (α j))) s fun j t => t, pi_univ, inter_univ, preimage]
state_before: ι : Type u_1
α : ι → Type u_2
β : ι → Type ?u.153466
s✝ s₁ s₂ : Set ι
t t₁ t₂ : (i : ι) → Set (α i)
i✝ : ι
inst✝ : DecidableEq ι
i : ι
s : Set (α i)
⊢ pi univ (update (fun j => univ) i s) = eval i ⁻¹' s
Theorem: Sylow.card_eq_multiplicity
File: Mathlib/GroupTheory/Sylow.lean

tactic: obtain ⟨n, heq : card P = _⟩ := IsPGroup.iff_card.mp P.isPGroup'
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p : ℕ
hp : Fact (Nat.Prime p)
P : Sylow p G
⊢ Fintype.card { x // x ∈ ↑P } = p ^ ↑(Nat.factorization (Fintype.card G)) p

tactic: refine' Nat.dvd_antisymm _ (P.pow_dvd_card_of_pow_dvd_card (Nat.ord_proj_dvd _ p))
state_before: case intro
G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p : ℕ
hp : Fact (Nat.Prime p)
P : Sylow p G
n : ℕ
heq : Fintype.card { x // x ∈ ↑P } = p ^ n
⊢ Fintype.card { x // x ∈ ↑P } = p ^ ↑(Nat.factorization (Fintype.card G)) p

tactic: rw [heq, ← hp.out.pow_dvd_iff_dvd_ord_proj (show card G ≠ 0 from card_ne_zero), ← heq]
state_before: case intro
G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p : ℕ
hp : Fact (Nat.Prime p)
P : Sylow p G
n : ℕ
heq : Fintype.card { x // x ∈ ↑P } = p ^ n
⊢ Fintype.card { x // x ∈ ↑P } ∣ p ^ ↑(Nat.factorization (Fintype.card G)) p

tactic: exact P.1.card_subgroup_dvd_card
state_before: case intro
G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p : ℕ
hp : Fact (Nat.Prime p)
P : Sylow p G
n : ℕ
heq : Fintype.card { x // x ∈ ↑P } = p ^ n
⊢ Fintype.card { x // x ∈ ↑P } ∣ Fintype.card G
Theorem: CategoryTheory.Equivalence.cancel_unit_right
File: Mathlib/CategoryTheory/Equivalence.lean

tactic: simp only [cancel_mono]
state_before: C : Type u₁
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
E : Type u₃
inst✝ : Category E
e : C ≌ D
X Y : C
f f' : X ⟶ Y
⊢ f ≫ (unit e).app Y = f' ≫ (unit e).app Y ↔ f = f'
Theorem: Finsupp.disjoint_supported_supported
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: rw [← supported_inter, disjoint_iff_inter_eq_empty.1 h, supported_empty]
state_before: α : Type u_1
M : Type u_2
N : Type ?u.113774
P : Type ?u.113777
R : Type u_3
S : Type ?u.113783
inst✝⁷ : Semiring R
inst✝⁶ : Semiring S
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
s t : Set α
h : Disjoint s t
⊢ supported M R s ⊓ supported M R t = ⊥
Theorem: Pell.isPell_one
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: simp [dz_val]
state_before: a : ℕ
a1 : 1 < a
⊢ az a * az a - ↑(Pell.d a1) * 1 * 1 = 1
Theorem: hasDerivWithinAt_Ioi_iff_Ici
File: Mathlib/Analysis/Calculus/Deriv/Basic.lean

tactic: rw [← Ici_diff_left, hasDerivWithinAt_diff_singleton]
state_before: 𝕜 : Type u
inst✝⁵ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace 𝕜 F
E : Type w
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
inst✝ : PartialOrder 𝕜
⊢ HasDerivWithinAt f f' (Ioi x) x ↔ HasDerivWithinAt f f' (Ici x) x
Theorem: Rat.exists
File: Mathlib/Data/Rat/Lemmas.lean

tactic: convert hr
state_before: p : ℚ → Prop
x✝ : ∃ r, p r
r : ℚ
hr : p r
⊢ p (↑r.num / ↑↑r.den)

tactic: convert num_div_den r
state_before: case h.e'_1
p : ℚ → Prop
x✝ : ∃ r, p r
r : ℚ
hr : p r
⊢ ↑r.num / ↑↑r.den = r
Theorem: IsCompact.exists_infEdist_eq_edist
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: have A : Continuous fun y => edist x y := continuous_const.edist continuous_id
state_before: ι : Sort ?u.27190
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x✝ y : α
s t : Set α
Φ : α → β
hs : IsCompact s
hne : Set.Nonempty s
x : α
⊢ ∃ y, y ∈ s ∧ infEdist x s = edist x y

tactic: obtain ⟨y, ys, hy⟩ : ∃ y ∈ s, ∀ z, z ∈ s → edist x y ≤ edist x z :=
  hs.exists_forall_le hne A.continuousOn
state_before: ι : Sort ?u.27190
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x✝ y : α
s t : Set α
Φ : α → β
hs : IsCompact s
hne : Set.Nonempty s
x : α
A : Continuous fun y => edist x y
⊢ ∃ y, y ∈ s ∧ infEdist x s = edist x y

tactic: exact ⟨y, ys, le_antisymm (infEdist_le_edist_of_mem ys) (by rwa [le_infEdist])⟩
state_before: case intro.intro
ι : Sort ?u.27190
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x✝ y✝ : α
s t : Set α
Φ : α → β
hs : IsCompact s
hne : Set.Nonempty s
x : α
A : Continuous fun y => edist x y
y : α
ys : y ∈ s
hy : ∀ (z : α), z ∈ s → edist x y ≤ edist x z
⊢ ∃ y, y ∈ s ∧ infEdist x s = edist x y

tactic: rwa [le_infEdist]
state_before: ι : Sort ?u.27190
α : Type u
β : Type v
inst✝¹ : PseudoEMetricSpace α
inst✝ : PseudoEMetricSpace β
x✝ y✝ : α
s t : Set α
Φ : α → β
hs : IsCompact s
hne : Set.Nonempty s
x : α
A : Continuous fun y => edist x y
y : α
ys : y ∈ s
hy : ∀ (z : α), z ∈ s → edist x y ≤ edist x z
⊢ edist x y ≤ infEdist x s
Theorem: CategoryTheory.leftAdjointMate_comp
File: Mathlib/CategoryTheory/Monoidal/Rigid/Basic.lean

tactic: dsimp only [leftAdjointMate]
state_before: C : Type u₁
inst✝³ : Category C
inst✝² : MonoidalCategory C
X Y Z : C
inst✝¹ : HasLeftDual X
inst✝ : HasLeftDual Y
f : X ⟶ Y
g : ᘁX ⟶ Z
⊢ (ᘁf) ≫ g = (λ_ ᘁY).inv ≫ (η_ (ᘁX) X ⊗ 𝟙 ᘁY) ≫ ((g ⊗ f) ⊗ 𝟙 ᘁY) ≫ (α_ Z Y ᘁY).hom ≫ (𝟙 Z ⊗ ε_ (ᘁY) Y) ≫ (ρ_ Z).hom

tactic: rw [Category.assoc, Category.assoc, associator_naturality_assoc, associator_naturality_assoc, ←
  id_tensor_comp_tensor_id _ g, Category.assoc, Category.assoc, Category.assoc, Category.assoc,
  tensor_id_comp_id_tensor_assoc, ← rightUnitor_naturality, id_tensor_comp_tensor_id_assoc]
state_before: C : Type u₁
inst✝³ : Category C
inst✝² : MonoidalCategory C
X Y Z : C
inst✝¹ : HasLeftDual X
inst✝ : HasLeftDual Y
f : X ⟶ Y
g : ᘁX ⟶ Z
⊢ ((λ_ ᘁY).inv ≫ (η_ (ᘁX) X ⊗ 𝟙 ᘁY) ≫ ((𝟙 ᘁX ⊗ f) ⊗ 𝟙 ᘁY) ≫ (α_ (ᘁX) Y ᘁY).hom ≫ (𝟙 ᘁX ⊗ ε_ (ᘁY) Y) ≫ (ρ_ ᘁX).hom) ≫ g =
    (λ_ ᘁY).inv ≫ (η_ (ᘁX) X ⊗ 𝟙 ᘁY) ≫ ((g ⊗ f) ⊗ 𝟙 ᘁY) ≫ (α_ Z Y ᘁY).hom ≫ (𝟙 Z ⊗ ε_ (ᘁY) Y) ≫ (ρ_ Z).hom
Theorem: Nat.even_add_one
File: Mathlib/Data/Nat/Parity.lean

tactic: simp [even_add]
state_before: m n : ℕ
⊢ Even (n + 1) ↔ ¬Even n
Theorem: gauge_empty
File: Mathlib/Analysis/Convex/Gauge.lean

tactic: ext
state_before: 𝕜 : Type ?u.33039
E : Type u_1
F : Type ?u.33045
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s t : Set E
a : ℝ
⊢ gauge ∅ = 0

tactic: simp only [gauge_def', Real.sInf_empty, mem_empty_iff_false, Pi.zero_apply, sep_false]
state_before: case h
𝕜 : Type ?u.33039
E : Type u_1
F : Type ?u.33045
inst✝¹ : AddCommGroup E
inst✝ : Module ℝ E
s t : Set E
a : ℝ
x✝ : E
⊢ gauge ∅ x✝ = OfNat.ofNat 0 x✝
Theorem: QuadraticForm.discr_smul
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

tactic: simp only [discr, toMatrix'_smul, Matrix.det_smul]
state_before: S : Type ?u.614314
R : Type ?u.614317
R₁ : Type u_1
M : Type ?u.614323
n : Type w
inst✝⁵ : Fintype n
inst✝⁴ : CommRing R₁
inst✝³ : DecidableEq n
inst✝² : Invertible 2
m : Type w
inst✝¹ : DecidableEq m
inst✝ : Fintype m
Q : QuadraticForm R₁ (n → R₁)
a : R₁
⊢ discr (a • Q) = a ^ Fintype.card n * discr Q
Theorem: PrimeSpectrum.localization_away_comap_range
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

tactic: rw [localization_comap_range S (Submonoid.powers r)]
state_before: R : Type u
S✝ : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing S✝
S : Type v
inst✝² : CommRing S
inst✝¹ : Algebra R S
r : R
inst✝ : IsLocalization.Away r S
⊢ Set.range ↑(comap (algebraMap R S)) = ↑(basicOpen r)

tactic: ext x
state_before: R : Type u
S✝ : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing S✝
S : Type v
inst✝² : CommRing S
inst✝¹ : Algebra R S
r : R
inst✝ : IsLocalization.Away r S
⊢ {p | Disjoint ↑(Submonoid.powers r) ↑p.asIdeal} = ↑(basicOpen r)

tactic: simp only [mem_zeroLocus, basicOpen_eq_zeroLocus_compl, SetLike.mem_coe, Set.mem_setOf_eq,
  Set.singleton_subset_iff, Set.mem_compl_iff, disjoint_iff_inf_le]
state_before: case h
R : Type u
S✝ : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing S✝
S : Type v
inst✝² : CommRing S
inst✝¹ : Algebra R S
r : R
inst✝ : IsLocalization.Away r S
x : PrimeSpectrum R
⊢ x ∈ {p | Disjoint ↑(Submonoid.powers r) ↑p.asIdeal} ↔ x ∈ ↑(basicOpen r)

tactic: constructor
state_before: case h
R : Type u
S✝ : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing S✝
S : Type v
inst✝² : CommRing S
inst✝¹ : Algebra R S
r : R
inst✝ : IsLocalization.Away r S
x : PrimeSpectrum R
⊢ ↑(Submonoid.powers r) ⊓ ↑x.asIdeal ≤ ⊥ ↔ ¬r ∈ x.asIdeal

tactic: intro h₁ h₂
state_before: case h.mp
R : Type u
S✝ : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing S✝
S : Type v
inst✝² : CommRing S
inst✝¹ : Algebra R S
r : R
inst✝ : IsLocalization.Away r S
x : PrimeSpectrum R
⊢ ↑(Submonoid.powers r) ⊓ ↑x.asIdeal ≤ ⊥ → ¬r ∈ x.asIdeal

tactic: exact h₁ ⟨Submonoid.mem_powers r, h₂⟩
state_before: case h.mp
R : Type u
S✝ : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing S✝
S : Type v
inst✝² : CommRing S
inst✝¹ : Algebra R S
r : R
inst✝ : IsLocalization.Away r S
x : PrimeSpectrum R
h₁ : ↑(Submonoid.powers r) ⊓ ↑x.asIdeal ≤ ⊥
h₂ : r ∈ x.asIdeal
⊢ False

tactic: rintro h₁ _ ⟨⟨n, rfl⟩, h₃⟩
state_before: case h.mpr
R : Type u
S✝ : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing S✝
S : Type v
inst✝² : CommRing S
inst✝¹ : Algebra R S
r : R
inst✝ : IsLocalization.Away r S
x : PrimeSpectrum R
⊢ ¬r ∈ x.asIdeal → ↑(Submonoid.powers r) ⊓ ↑x.asIdeal ≤ ⊥

tactic: exact h₁ (x.2.mem_of_pow_mem _ h₃)
state_before: case h.mpr.intro.intro
R : Type u
S✝ : Type v
inst✝⁴ : CommRing R
inst✝³ : CommRing S✝
S : Type v
inst✝² : CommRing S
inst✝¹ : Algebra R S
r : R
inst✝ : IsLocalization.Away r S
x : PrimeSpectrum R
h₁ : ¬r ∈ x.asIdeal
n : ℕ
h₃ : (fun x x_1 => x ^ x_1) r n ∈ ↑x.asIdeal
⊢ (fun x x_1 => x ^ x_1) r n ∈ ⊥
Theorem: CategoryTheory.Subobject.ofMkLEMk_refl
File: Mathlib/CategoryTheory/Subobject/Basic.lean

tactic: apply (cancel_mono f).mp
state_before: C : Type u₁
inst✝² : Category C
X Y Z : C
D : Type u₂
inst✝¹ : Category D
B A₁ : C
f : A₁ ⟶ B
inst✝ : Mono f
⊢ ofMkLEMk f f (_ : mk f ≤ mk f) = 𝟙 A₁

tactic: simp
state_before: C : Type u₁
inst✝² : Category C
X Y Z : C
D : Type u₂
inst✝¹ : Category D
B A₁ : C
f : A₁ ⟶ B
inst✝ : Mono f
⊢ ofMkLEMk f f (_ : mk f ≤ mk f) ≫ f = 𝟙 A₁ ≫ f
Theorem: Ordinal.log_le_self
File: Mathlib/SetTheory/Ordinal/Exponential.lean

tactic: simp only [hx, log_zero_right, Ordinal.zero_le]
state_before: b x : Ordinal
hx : x = 0
⊢ log b x ≤ x

tactic: simp only [log_of_not_one_lt_left hb, Ordinal.zero_le]
state_before: b x : Ordinal
hx : ¬x = 0
hb : ¬1 < b
⊢ log b x ≤ x
Theorem: CategoryTheory.isCoseparator_prod_of_isCoseparator_right
File: Mathlib/CategoryTheory/Generator.lean

tactic: simp
state_before: C : Type u₁
inst✝³ : Category C
D : Type u₂
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
G H : C
inst✝ : HasBinaryProduct G H
hH : IsCoseparator H
⊢ {H} ⊆ {G, H}
Theorem: CategoryTheory.MonoidalCategory.tensor_left_iff
File: Mathlib/CategoryTheory/Monoidal/Category.lean

tactic: simp
state_before: C✝ : Type u
𝒞 : Category C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category C
inst✝ : MonoidalCategory C
U V W X✝ Y✝ Z X Y : C
f g : X ⟶ Y
⊢ 𝟙 (𝟙_ C) ⊗ f = 𝟙 (𝟙_ C) ⊗ g ↔ f = g