tasksource/leandojo huggingface dataset:
Theorem: Int.ceil_sub_self_eq
File: Mathlib/Algebra/Order/Floor.lean

tactic: rw [(or_iff_right ha).mp (fract_eq_zero_or_add_one_sub_ceil a)]
state_before: F : Type ?u.235278
α : Type u_1
β : Type ?u.235284
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a : α
ha : fract a ≠ 0
⊢ ↑⌈a⌉ - a = 1 - fract a

tactic: abel
state_before: F : Type ?u.235278
α : Type u_1
β : Type ?u.235284
inst✝¹ : LinearOrderedRing α
inst✝ : FloorRing α
z : ℤ
a : α
ha : fract a ≠ 0
⊢ ↑⌈a⌉ - a = 1 - (a + 1 - ↑⌈a⌉)
Theorem: IsUpperSet.cthickening'
File: Mathlib/Analysis/Normed/Order/UpperLower.lean

tactic: rw [cthickening_eq_iInter_thickening'']
state_before: α : Type u_1
ι : Type ?u.1091
inst✝ : NormedOrderedGroup α
s : Set α
hs : IsUpperSet s
ε : ℝ
⊢ IsUpperSet (cthickening ε s)

tactic: exact isUpperSet_iInter₂ fun δ _ => hs.thickening' _
state_before: α : Type u_1
ι : Type ?u.1091
inst✝ : NormedOrderedGroup α
s : Set α
hs : IsUpperSet s
ε : ℝ
⊢ IsUpperSet (⋂ (ε_1 : ℝ) (_ : max 0 ε < ε_1), thickening ε_1 s)
Theorem: String.prev_of_valid'
File: Std/Data/String/Lemmas.lean

tactic: match cs, cs.eq_nil_or_concat with
| _, .inl rfl => rfl
| _, .inr ⟨cs, c, rfl⟩ => simp [prev_of_valid]
state_before: cs cs' : List Char
⊢ prev { data := cs ++ cs' } { byteIdx := utf8Len cs } = { byteIdx := utf8Len (List.dropLast cs) }

tactic: rfl
state_before: cs cs' : List Char
⊢ prev { data := [] ++ cs' } { byteIdx := utf8Len [] } = { byteIdx := utf8Len (List.dropLast []) }

tactic: simp [prev_of_valid]
state_before: cs✝ cs' cs : List Char
c : Char
⊢ prev { data := cs ++ [c] ++ cs' } { byteIdx := utf8Len (cs ++ [c]) } =
    { byteIdx := utf8Len (List.dropLast (cs ++ [c])) }
Theorem: ENNReal.toNNReal_mul_top
File: Mathlib/Data/Real/ENNReal.lean

tactic: simp
state_before: α : Type ?u.818251
β : Type ?u.818254
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
⊢ ENNReal.toNNReal (a * ⊤) = 0
Theorem: Traversable.traverse_map
File: Mathlib/Control/Traversable/Lemmas.lean

tactic: rw [@map_eq_traverse_id t _ _ _ _ g]
state_before: t : Type u → Type u
inst✝⁵ : Traversable t
inst✝⁴ : IsLawfulTraversable t
F G : Type u → Type u
inst✝³ : Applicative F
inst✝² : LawfulApplicative F
inst✝¹ : Applicative G
inst✝ : LawfulApplicative G
α β γ : Type u
g✝ : α → F β
h : β → G γ
f✝ : β → γ
x✝ : t β
f : β → F γ
g : α → β
x : t α
⊢ traverse f (g <$> x) = traverse (f ∘ g) x

tactic: refine' (comp_traverse (G := Id) f (pure ∘ g) x).symm.trans _
state_before: t : Type u → Type u
inst✝⁵ : Traversable t
inst✝⁴ : IsLawfulTraversable t
F G : Type u → Type u
inst✝³ : Applicative F
inst✝² : LawfulApplicative F
inst✝¹ : Applicative G
inst✝ : LawfulApplicative G
α β γ : Type u
g✝ : α → F β
h : β → G γ
f✝ : β → γ
x✝ : t β
f : β → F γ
g : α → β
x : t α
⊢ traverse f (traverse (pure ∘ g) x) = traverse (f ∘ g) x

tactic: congr
state_before: t : Type u → Type u
inst✝⁵ : Traversable t
inst✝⁴ : IsLawfulTraversable t
F G : Type u → Type u
inst✝³ : Applicative F
inst✝² : LawfulApplicative F
inst✝¹ : Applicative G
inst✝ : LawfulApplicative G
α β γ : Type u
g✝ : α → F β
h : β → G γ
f✝ : β → γ
x✝ : t β
f : β → F γ
g : α → β
x : t α
⊢ traverse (Comp.mk ∘ map f ∘ pure ∘ g) x = traverse (f ∘ g) x

tactic: apply Comp.applicative_id_comp
state_before: case h.e_4.h
t : Type u → Type u
inst✝⁵ : Traversable t
inst✝⁴ : IsLawfulTraversable t
F G : Type u → Type u
inst✝³ : Applicative F
inst✝² : LawfulApplicative F
inst✝¹ : Applicative G
inst✝ : LawfulApplicative G
α β γ : Type u
g✝ : α → F β
h : β → G γ
f✝ : β → γ
x✝ : t β
f : β → F γ
g : α → β
x : t α
⊢ Comp.instApplicativeComp = inst✝³
Theorem: Pmf.toOuterMeasure_apply_eq_one_iff
File: Mathlib/Probability/ProbabilityMassFunction/Basic.lean

tactic: refine' (p.toOuterMeasure_apply s).symm ▸ ⟨fun h a hap => _, fun h => _⟩
state_before: α : Type u_1
β : Type ?u.26301
γ : Type ?u.26304
p : Pmf α
s t : Set α
⊢ ↑(toOuterMeasure p) s = 1 ↔ support p ⊆ s

tactic: refine' by_contra fun hs => ne_of_lt _ (h.trans p.tsum_coe.symm)
state_before: case refine'_1
α : Type u_1
β : Type ?u.26301
γ : Type ?u.26304
p : Pmf α
s t : Set α
h : (∑' (x : α), Set.indicator s (↑p) x) = 1
a : α
hap : a ∈ support p
⊢ a ∈ s

tactic: have hs' : s.indicator p a = 0 := Set.indicator_apply_eq_zero.2 fun hs' => False.elim <| hs hs'
state_before: case refine'_1
α : Type u_1
β : Type ?u.26301
γ : Type ?u.26304
p : Pmf α
s t : Set α
h : (∑' (x : α), Set.indicator s (↑p) x) = 1
a : α
hap : a ∈ support p
hs : ¬a ∈ s
⊢ (∑' (x : α), Set.indicator s (↑p) x) < ∑' (a : α), ↑p a

tactic: have hsa : s.indicator p a < p a := hs'.symm ▸ (p.apply_pos_iff a).2 hap
state_before: case refine'_1
α : Type u_1
β : Type ?u.26301
γ : Type ?u.26304
p : Pmf α
s t : Set α
h : (∑' (x : α), Set.indicator s (↑p) x) = 1
a : α
hap : a ∈ support p
hs : ¬a ∈ s
hs' : Set.indicator s (↑p) a = 0
⊢ (∑' (x : α), Set.indicator s (↑p) x) < ∑' (a : α), ↑p a

tactic: exact ENNReal.tsum_lt_tsum (p.tsum_coe_indicator_ne_top s)
  (fun x => Set.indicator_apply_le fun _ => le_rfl) hsa
state_before: case refine'_1
α : Type u_1
β : Type ?u.26301
γ : Type ?u.26304
p : Pmf α
s t : Set α
h : (∑' (x : α), Set.indicator s (↑p) x) = 1
a : α
hap : a ∈ support p
hs : ¬a ∈ s
hs' : Set.indicator s (↑p) a = 0
hsa : Set.indicator s (↑p) a < ↑p a
⊢ (∑' (x : α), Set.indicator s (↑p) x) < ∑' (a : α), ↑p a

tactic: suffices : ∀ (x) (_ : x ∉ s), p x = 0
state_before: case refine'_2
α : Type u_1
β : Type ?u.26301
γ : Type ?u.26304
p : Pmf α
s t : Set α
h : support p ⊆ s
⊢ (∑' (x : α), Set.indicator s (↑p) x) = 1

tactic: exact _root_.trans (tsum_congr
  fun a => (Set.indicator_apply s p a).trans (ite_eq_left_iff.2 <| symm ∘ this a)) p.tsum_coe
state_before: case refine'_2
α : Type u_1
β : Type ?u.26301
γ : Type ?u.26304
p : Pmf α
s t : Set α
h : support p ⊆ s
this : ∀ (x : α), ¬x ∈ s → ↑p x = 0
⊢ (∑' (x : α), Set.indicator s (↑p) x) = 1

case this
α : Type u_1
β : Type ?u.26301
γ : Type ?u.26304
p : Pmf α
s t : Set α
h : support p ⊆ s
⊢ ∀ (x : α), ¬x ∈ s → ↑p x = 0

tactic: exact fun a ha => (p.apply_eq_zero_iff a).2 <| Set.not_mem_subset h ha
state_before: case this
α : Type u_1
β : Type ?u.26301
γ : Type ?u.26304
p : Pmf α
s t : Set α
h : support p ⊆ s
⊢ ∀ (x : α), ¬x ∈ s → ↑p x = 0
Theorem: IsPreconnected.eq_univ_of_unbounded
File: Mathlib/Topology/Algebra/Order/IntermediateValue.lean

tactic: refine' eq_univ_of_forall fun x => _
state_before: X : Type u
α : Type v
inst✝³ : TopologicalSpace X
inst✝² : LinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
s : Set α
hs : IsPreconnected s
hb : ¬BddBelow s
ha : ¬BddAbove s
⊢ s = univ

tactic: obtain ⟨y, ys, hy⟩ : ∃ y ∈ s, y < x := not_bddBelow_iff.1 hb x
state_before: X : Type u
α : Type v
inst✝³ : TopologicalSpace X
inst✝² : LinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
s : Set α
hs : IsPreconnected s
hb : ¬BddBelow s
ha : ¬BddAbove s
x : α
⊢ x ∈ s

tactic: obtain ⟨z, zs, hz⟩ : ∃ z ∈ s, x < z := not_bddAbove_iff.1 ha x
state_before: case intro.intro
X : Type u
α : Type v
inst✝³ : TopologicalSpace X
inst✝² : LinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
s : Set α
hs : IsPreconnected s
hb : ¬BddBelow s
ha : ¬BddAbove s
x y : α
ys : y ∈ s
hy : y < x
⊢ x ∈ s

tactic: exact hs.Icc_subset ys zs ⟨le_of_lt hy, le_of_lt hz⟩
state_before: case intro.intro.intro.intro
X : Type u
α : Type v
inst✝³ : TopologicalSpace X
inst✝² : LinearOrder α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
s : Set α
hs : IsPreconnected s
hb : ¬BddBelow s
ha : ¬BddAbove s
x y : α
ys : y ∈ s
hy : y < x
z : α
zs : z ∈ s
hz : x < z
⊢ x ∈ s
Theorem: TopCat.Presheaf.Pushforward.id_hom_app'
File: Mathlib/Topology/Sheaves/Presheaf.lean

tactic: dsimp [id]
state_before: C : Type u
inst✝ : Category C
X : TopCat
ℱ : Presheaf C X
U : Set ↑X
p : IsOpen U
⊢ (id ℱ).hom.app { carrier := U, is_open' := p }.op = ℱ.map (𝟙 { carrier := U, is_open' := p }.op)

tactic: simp [CategoryStruct.comp]
state_before: C : Type u
inst✝ : Category C
X : TopCat
ℱ : Presheaf C X
U : Set ↑X
p : IsOpen U
⊢ (whiskerRight (NatTrans.op (Opens.mapId X).inv) ℱ ≫ (Functor.leftUnitor ℱ).hom).app
      { carrier := U, is_open' := p }.op =
    ℱ.map (𝟙 { carrier := U, is_open' := p }.op)
Theorem: Trivialization.Prod.right_inv
File: Mathlib/Topology/FiberBundle/Constructions.lean

tactic: obtain ⟨x, w₁, w₂⟩ := x
state_before: B : Type u_1
inst✝⁶ : TopologicalSpace B
F₁ : Type u_3
inst✝⁵ : TopologicalSpace F₁
E₁ : B → Type u_4
inst✝⁴ : TopologicalSpace (TotalSpace E₁)
F₂ : Type u_2
inst✝³ : TopologicalSpace F₂
E₂ : B → Type u_5
inst✝² : TopologicalSpace (TotalSpace E₂)
e₁ : Trivialization F₁ TotalSpace.proj
e₂ : Trivialization F₂ TotalSpace.proj
inst✝¹ : (x : B) → Zero (E₁ x)
inst✝ : (x : B) → Zero (E₂ x)
x : B × F₁ × F₂
h : x ∈ (e₁.baseSet ∩ e₂.baseSet) ×ˢ univ
⊢ toFun' e₁ e₂ (invFun' e₁ e₂ x) = x

tactic: obtain ⟨⟨h₁ : x ∈ e₁.baseSet, h₂ : x ∈ e₂.baseSet⟩, -⟩ := h
state_before: case mk.mk
B : Type u_1
inst✝⁶ : TopologicalSpace B
F₁ : Type u_3
inst✝⁵ : TopologicalSpace F₁
E₁ : B → Type u_4
inst✝⁴ : TopologicalSpace (TotalSpace E₁)
F₂ : Type u_2
inst✝³ : TopologicalSpace F₂
E₂ : B → Type u_5
inst✝² : TopologicalSpace (TotalSpace E₂)
e₁ : Trivialization F₁ TotalSpace.proj
e₂ : Trivialization F₂ TotalSpace.proj
inst✝¹ : (x : B) → Zero (E₁ x)
inst✝ : (x : B) → Zero (E₂ x)
x : B
w₁ : F₁
w₂ : F₂
h : (x, w₁, w₂) ∈ (e₁.baseSet ∩ e₂.baseSet) ×ˢ univ
⊢ toFun' e₁ e₂ (invFun' e₁ e₂ (x, w₁, w₂)) = (x, w₁, w₂)

tactic: simp only [Prod.toFun', Prod.invFun', apply_mk_symm, h₁, h₂]
state_before: case mk.mk.intro.intro
B : Type u_1
inst✝⁶ : TopologicalSpace B
F₁ : Type u_3
inst✝⁵ : TopologicalSpace F₁
E₁ : B → Type u_4
inst✝⁴ : TopologicalSpace (TotalSpace E₁)
F₂ : Type u_2
inst✝³ : TopologicalSpace F₂
E₂ : B → Type u_5
inst✝² : TopologicalSpace (TotalSpace E₂)
e₁ : Trivialization F₁ TotalSpace.proj
e₂ : Trivialization F₂ TotalSpace.proj
inst✝¹ : (x : B) → Zero (E₁ x)
inst✝ : (x : B) → Zero (E₂ x)
x : B
w₁ : F₁
w₂ : F₂
h₁ : x ∈ e₁.baseSet
h₂ : x ∈ e₂.baseSet
⊢ toFun' e₁ e₂ (invFun' e₁ e₂ (x, w₁, w₂)) = (x, w₁, w₂)
Theorem: Bool.false_xor
File: Mathlib/Init/Data/Bool/Lemmas.lean

tactic: cases b <;> simp
state_before: b : Bool
⊢ xor false b = b
Theorem: PosNum.cast_add
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [← cast_to_nat, add_to_nat, Nat.cast_add, cast_to_nat, cast_to_nat]
state_before: α : Type u_1
inst✝ : AddMonoidWithOne α
m n : PosNum
⊢ ↑(m + n) = ↑m + ↑n
Theorem: List.traverse_eq_map_id
File: Mathlib/Control/Traversable/Instances.lean

tactic: induction x <;> simp! [*, functor_norm]
state_before: F G : Type u → Type u
inst✝³ : Applicative F
inst✝² : Applicative G
inst✝¹ : LawfulApplicative F
inst✝ : LawfulApplicative G
α β : Type u_1
f : α → β
x : List α
⊢ List.traverse (pure ∘ f) x = pure (f <$> x)

tactic: rfl
state_before: case cons
F G : Type u → Type u
inst✝³ : Applicative F
inst✝² : Applicative G
inst✝¹ : LawfulApplicative F
inst✝ : LawfulApplicative G
α β : Type u_1
f : α → β
head✝ : α
tail✝ : List α
tail_ih✝ : List.traverse (pure ∘ f) tail✝ = pure (f <$> tail✝)
⊢ (Seq.seq (cons (f head✝)) fun x => map f tail✝) = f head✝ :: map f tail✝
Theorem: Mathlib.Tactic.Ring.pow_one_cast
File: Mathlib/Tactic/Ring/Basic.lean

tactic: simp
state_before: u : Lean.Level
R : Type u_1
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
a : R
⊢ a ^ Nat.rawCast 1 = a
Theorem: MonoidAlgebra.opRingEquiv_symm_single
File: Mathlib/Algebra/MonoidAlgebra/Basic.lean

tactic: simp
state_before: k : Type u₁
G : Type u₂
R : Type ?u.1569928
inst✝¹ : Semiring k
inst✝ : Monoid G
r : kᵐᵒᵖ
x : Gᵐᵒᵖ
⊢ ↑(RingEquiv.symm MonoidAlgebra.opRingEquiv) (single x r) = op (single (unop x) (unop r))
Theorem: CategoryTheory.Limits.zero_of_epi_comp
File: Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean

tactic: rw [← comp_zero, cancel_epi] at h
state_before: C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝ : Epi f
h : f ≫ g = 0
⊢ g = 0

tactic: exact h
state_before: C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝ : Epi f
h✝ : f ≫ g = 0
h : g = 0
⊢ g = 0
Theorem: rank_finsupp
File: Mathlib/LinearAlgebra/FreeModule/Rank.lean

tactic: obtain ⟨⟨_, bs⟩⟩ := Module.Free.exists_basis (R := R) (M := M)
state_before: R : Type u
M : Type v
N : Type w
inst✝⁷ : Ring R
inst✝⁶ : StrongRankCondition R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : Module.Free R N
ι : Type w
⊢ Module.rank R (ι →₀ M) = Cardinal.lift (#ι) * Cardinal.lift (Module.rank R M)

tactic: rw [← bs.mk_eq_rank'', ← (Finsupp.basis fun _ : ι => bs).mk_eq_rank'', Cardinal.mk_sigma,
  Cardinal.sum_const]
state_before: case intro.mk
R : Type u
M : Type v
N : Type w
inst✝⁷ : Ring R
inst✝⁶ : StrongRankCondition R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Module.Free R M
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : Module.Free R N
ι : Type w
fst✝ : Type v
bs : Basis fst✝ R M
⊢ Module.rank R (ι →₀ M) = Cardinal.lift (#ι) * Cardinal.lift (Module.rank R M)
Theorem: Matrix.det_eq_of_forall_col_eq_smul_add_pred
File: Mathlib/LinearAlgebra/Matrix/Determinant.lean

tactic: rw [← det_transpose A, ← det_transpose B]
state_before: m : Type ?u.1750254
n✝ : Type ?u.1750257
inst✝⁴ : DecidableEq n✝
inst✝³ : Fintype n✝
inst✝² : DecidableEq m
inst✝¹ : Fintype m
R : Type v
inst✝ : CommRing R
n : ℕ
A B : Matrix (Fin (n + 1)) (Fin (n + 1)) R
c : Fin n → R
A_zero : ∀ (i : Fin (n + 1)), A i 0 = B i 0
A_succ : ∀ (i : Fin (n + 1)) (j : Fin n), A i (Fin.succ j) = B i (Fin.succ j) + c j * A i (↑Fin.castSucc j)
⊢ det A = det B

tactic: exact det_eq_of_forall_row_eq_smul_add_pred c A_zero fun i j => A_succ j i
state_before: m : Type ?u.1750254
n✝ : Type ?u.1750257
inst✝⁴ : DecidableEq n✝
inst✝³ : Fintype n✝
inst✝² : DecidableEq m
inst✝¹ : Fintype m
R : Type v
inst✝ : CommRing R
n : ℕ
A B : Matrix (Fin (n + 1)) (Fin (n + 1)) R
c : Fin n → R
A_zero : ∀ (i : Fin (n + 1)), A i 0 = B i 0
A_succ : ∀ (i : Fin (n + 1)) (j : Fin n), A i (Fin.succ j) = B i (Fin.succ j) + c j * A i (↑Fin.castSucc j)
⊢ det Aᵀ = det Bᵀ
Theorem: CauSeq.limZero_sub_rev
File: Mathlib/Data/Real/CauSeq.lean

tactic: simpa using neg_limZero hfg
state_before: α : Type u_1
β : Type u_2
inst✝² : LinearOrderedField α
inst✝¹ : Ring β
abv : β → α
inst✝ : IsAbsoluteValue abv
f g : CauSeq β abv
hfg : LimZero (f - g)
⊢ LimZero (g - f)
Theorem: Submodule.sup_toAddSubgroup
File: Mathlib/LinearAlgebra/Span.lean

tactic: ext x
state_before: R✝ : Type ?u.111042
R₂ : Type ?u.111045
K : Type ?u.111048
M✝ : Type ?u.111051
M₂ : Type ?u.111054
V : Type ?u.111057
S : Type ?u.111060
inst✝⁸ : Semiring R✝
inst✝⁷ : AddCommMonoid M✝
inst✝⁶ : Module R✝ M✝
x : M✝
p✝ p'✝ : Submodule R✝ M✝
inst✝⁵ : Semiring R₂
σ₁₂ : R✝ →+* R₂
inst✝⁴ : AddCommMonoid M₂
inst✝³ : Module R₂ M₂
s t : Set M✝
R : Type u_1
M : Type u_2
inst✝² : Ring R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
p p' : Submodule R M
⊢ toAddSubgroup (p ⊔ p') = toAddSubgroup p ⊔ toAddSubgroup p'

tactic: rw [mem_toAddSubgroup, mem_sup, AddSubgroup.mem_sup]
state_before: case h
R✝ : Type ?u.111042
R₂ : Type ?u.111045
K : Type ?u.111048
M✝ : Type ?u.111051
M₂ : Type ?u.111054
V : Type ?u.111057
S : Type ?u.111060
inst✝⁸ : Semiring R✝
inst✝⁷ : AddCommMonoid M✝
inst✝⁶ : Module R✝ M✝
x✝ : M✝
p✝ p'✝ : Submodule R✝ M✝
inst✝⁵ : Semiring R₂
σ₁₂ : R✝ →+* R₂
inst✝⁴ : AddCommMonoid M₂
inst✝³ : Module R₂ M₂
s t : Set M✝
R : Type u_1
M : Type u_2
inst✝² : Ring R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
p p' : Submodule R M
x : M
⊢ x ∈ toAddSubgroup (p ⊔ p') ↔ x ∈ toAddSubgroup p ⊔ toAddSubgroup p'

tactic: rfl
state_before: case h
R✝ : Type ?u.111042
R₂ : Type ?u.111045
K : Type ?u.111048
M✝ : Type ?u.111051
M₂ : Type ?u.111054
V : Type ?u.111057
S : Type ?u.111060
inst✝⁸ : Semiring R✝
inst✝⁷ : AddCommMonoid M✝
inst✝⁶ : Module R✝ M✝
x✝ : M✝
p✝ p'✝ : Submodule R✝ M✝
inst✝⁵ : Semiring R₂
σ₁₂ : R✝ →+* R₂
inst✝⁴ : AddCommMonoid M₂
inst✝³ : Module R₂ M₂
s t : Set M✝
R : Type u_1
M : Type u_2
inst✝² : Ring R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
p p' : Submodule R M
x : M
⊢ (∃ y, y ∈ p ∧ ∃ z, z ∈ p' ∧ y + z = x) ↔ ∃ y, y ∈ toAddSubgroup p ∧ ∃ z, z ∈ toAddSubgroup p' ∧ y + z = x
Theorem: Finset.image₂_left_comm
File: Mathlib/Data/Finset/NAry.lean

tactic: push_cast
state_before: α : Type u_3
α' : Type ?u.72811
β : Type u_5
β' : Type ?u.72817
γ✝ : Type ?u.72820
γ' : Type ?u.72823
δ : Type u_4
δ' : Type u_6
ε : Type u_2
ε' : Type ?u.72835
ζ : Type ?u.72838
ζ' : Type ?u.72841
ν : Type ?u.72844
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ✝
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f✝ f'✝ : α → β → γ✝
g✝ g'✝ : α → β → γ✝ → δ
s s' : Finset α
t t' : Finset β
u✝ u' : Finset γ✝
a a' : α
b b' : β
c : γ✝
γ : Type u_1
u : Finset γ
f : α → δ → ε
g : β → γ → δ
f' : α → γ → δ'
g' : β → δ' → ε
h_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c)
⊢ ↑(image₂ f s (image₂ g t u)) = ↑(image₂ g' t (image₂ f' s u))

tactic: exact image2_left_comm h_left_comm
state_before: α : Type u_3
α' : Type ?u.72811
β : Type u_5
β' : Type ?u.72817
γ✝ : Type ?u.72820
γ' : Type ?u.72823
δ : Type u_4
δ' : Type u_6
ε : Type u_2
ε' : Type ?u.72835
ζ : Type ?u.72838
ζ' : Type ?u.72841
ν : Type ?u.72844
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ✝
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f✝ f'✝ : α → β → γ✝
g✝ g'✝ : α → β → γ✝ → δ
s s' : Finset α
t t' : Finset β
u✝ u' : Finset γ✝
a a' : α
b b' : β
c : γ✝
γ : Type u_1
u : Finset γ
f : α → δ → ε
g : β → γ → δ
f' : α → γ → δ'
g' : β → δ' → ε
h_left_comm : ∀ (a : α) (b : β) (c : γ), f a (g b c) = g' b (f' a c)
⊢ image2 f (↑s) (image2 g ↑t ↑u) = image2 g' (↑t) (image2 f' ↑s ↑u)
Theorem: Nat.ArithmeticFunction.sigma_one_apply
File: Mathlib/NumberTheory/ArithmeticFunction.lean

tactic: simp [sigma_apply]
state_before: R : Type ?u.522889
n : ℕ
⊢ ↑(σ 1) n = ∑ d in divisors n, d
Theorem: CategoryTheory.Limits.map_inr_inv_coprodComparison
File: Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean

tactic: simp [IsIso.inv_comp_eq]
state_before: C : Type u
inst✝⁶ : Category C
X Y : C
D : Type u₂
inst✝⁵ : Category D
F : C ⥤ D
A A' B B' : C
inst✝⁴ : HasBinaryCoproduct A B
inst✝³ : HasBinaryCoproduct A' B'
inst✝² : HasBinaryCoproduct (F.obj A) (F.obj B)
inst✝¹ : HasBinaryCoproduct (F.obj A') (F.obj B')
inst✝ : IsIso (coprodComparison F A B)
⊢ F.map coprod.inr ≫ inv (coprodComparison F A B) = coprod.inr
Theorem: Ideal.Quotient.maximal_of_isField
File: Mathlib/RingTheory/Ideal/Quotient.lean

tactic: apply Ideal.isMaximal_iff.2
state_before: R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
x y : R
I : Ideal R
hqf : IsField (R ⧸ I)
⊢ IsMaximal I

tactic: constructor
state_before: R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
x y : R
I : Ideal R
hqf : IsField (R ⧸ I)
⊢ ¬1 ∈ I ∧ ∀ (J : Ideal R) (x : R), I ≤ J → ¬x ∈ I → x ∈ J → 1 ∈ J

tactic: intro h
state_before: case left
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
x y : R
I : Ideal R
hqf : IsField (R ⧸ I)
⊢ ¬1 ∈ I

tactic: rcases hqf.exists_pair_ne with ⟨⟨x⟩, ⟨y⟩, hxy⟩
state_before: case left
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
x y : R
I : Ideal R
hqf : IsField (R ⧸ I)
h : 1 ∈ I
⊢ False

tactic: exact hxy (Ideal.Quotient.eq.2 (mul_one (x - y) ▸ I.mul_mem_left _ h))
state_before: case left.intro.mk.intro.mk
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
x✝ y✝ : R
I : Ideal R
hqf : IsField (R ⧸ I)
h : 1 ∈ I
w✝¹ : R ⧸ I
x : R
w✝ : R ⧸ I
y : R
hxy : Quot.mk Setoid.r x ≠ Quot.mk Setoid.r y
⊢ False

tactic: intro J x hIJ hxnI hxJ
state_before: case right
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
x y : R
I : Ideal R
hqf : IsField (R ⧸ I)
⊢ ∀ (J : Ideal R) (x : R), I ≤ J → ¬x ∈ I → x ∈ J → 1 ∈ J

tactic: rcases hqf.mul_inv_cancel (mt Ideal.Quotient.eq_zero_iff_mem.1 hxnI) with ⟨⟨y⟩, hy⟩
state_before: case right
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
x✝ y : R
I : Ideal R
hqf : IsField (R ⧸ I)
J : Ideal R
x : R
hIJ : I ≤ J
hxnI : ¬x ∈ I
hxJ : x ∈ J
⊢ 1 ∈ J

tactic: rw [← zero_add (1 : R), ← sub_self (x * y), sub_add]
state_before: case right.intro.mk
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
x✝ y✝ : R
I : Ideal R
hqf : IsField (R ⧸ I)
J : Ideal R
x : R
hIJ : I ≤ J
hxnI : ¬x ∈ I
hxJ : x ∈ J
w✝ : R ⧸ I
y : R
hy : ↑(mk I) x * Quot.mk Setoid.r y = 1
⊢ 1 ∈ J

tactic: refine' J.sub_mem (J.mul_mem_right _ hxJ) (hIJ (Ideal.Quotient.eq.1 hy))
state_before: case right.intro.mk
R : Type u
inst✝ : CommRing R
I✝ : Ideal R
a b : R
S : Type v
x✝ y✝ : R
I : Ideal R
hqf : IsField (R ⧸ I)
J : Ideal R
x : R
hIJ : I ≤ J
hxnI : ¬x ∈ I
hxJ : x ∈ J
w✝ : R ⧸ I
y : R
hy : ↑(mk I) x * Quot.mk Setoid.r y = 1
⊢ x * y - (x * y - 1) ∈ J
Theorem: Lists'.toList_cons
File: Mathlib/SetTheory/Lists.lean

tactic: simp
state_before: α : Type u_1
a : Lists α
l : Lists' α true
⊢ toList (cons a l) = a :: toList l
Theorem: Nat.Partrec.Code.eval_eq_rfindOpt
File: Mathlib/Computability/PartrecCode.lean

tactic: refine' evaln_complete.trans (Nat.rfindOpt_mono _).symm
state_before: c : Code
n x : ℕ
⊢ x ∈ eval c n ↔ x ∈ rfindOpt fun k => evaln k c n

tactic: intro a m n hl
state_before: c : Code
n x : ℕ
⊢ ∀ {a m n_1 : ℕ}, m ≤ n_1 → a ∈ evaln m c n → a ∈ evaln n_1 c n

tactic: apply evaln_mono hl
state_before: c : Code
n✝ x a m n : ℕ
hl : m ≤ n
⊢ a ∈ evaln m c n✝ → a ∈ evaln n c n✝
Theorem: PicardLindelof.exists_solution
File: Mathlib/Analysis/ODE/PicardLindelof.lean

tactic: rcases v.exists_fixed with ⟨f, hf⟩
state_before: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
v : PicardLindelof E
inst✝ : CompleteSpace E
⊢ ∃ f, f ↑v.t₀ = v.x₀ ∧ ∀ (t : ℝ), t ∈ Icc v.tMin v.tMax → HasDerivWithinAt f (toFun v t (f t)) (Icc v.tMin v.tMax) t

tactic: refine' ⟨f ∘ v.proj, _, fun t ht => _⟩
state_before: case intro
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
v : PicardLindelof E
inst✝ : CompleteSpace E
f : FunSpace v
hf : FunSpace.next f = f
⊢ ∃ f, f ↑v.t₀ = v.x₀ ∧ ∀ (t : ℝ), t ∈ Icc v.tMin v.tMax → HasDerivWithinAt f (toFun v t (f t)) (Icc v.tMin v.tMax) t

tactic: lift t to Icc v.tMin v.tMax using ht
state_before: case intro.refine'_2
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
v : PicardLindelof E
inst✝ : CompleteSpace E
f : FunSpace v
hf : FunSpace.next f = f
t : ℝ
ht : t ∈ Icc v.tMin v.tMax
⊢ HasDerivWithinAt (fun x => FunSpace.toFun f (proj v x)) (toFun v t (FunSpace.toFun f (proj v t))) (Icc v.tMin v.tMax)
    t

tactic: simpa only [hf, v.proj_coe] using f.hasDerivWithinAt_next t
state_before: case intro.refine'_2.intro
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
v : PicardLindelof E
inst✝ : CompleteSpace E
f : FunSpace v
hf : FunSpace.next f = f
t : { x // x ∈ Icc v.tMin v.tMax }
⊢ HasDerivWithinAt (fun x => FunSpace.toFun f (proj v x)) (toFun v (↑t) (FunSpace.toFun f (proj v ↑t)))
    (Icc v.tMin v.tMax) ↑t