Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
grunweg committed Oct 19, 2024
1 parent 5be0085 commit 3461abe
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Mathlib/Computability/Halting.lean
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ theorem halting_problem (n) : ¬ComputablePred fun c => (eval c n).Dom
-- Post's theorem on the equivalence of r.e., co-r.e. sets and
-- computable sets. The assumption that p is decidable is required
-- unless we assume Markov's principle or LEM.
@[nolint decidableClassical]
@[nolint allOfThem]
theorem computable_iff_re_compl_re {p : α → Prop} [DecidablePred p] :
ComputablePred p ↔ RePred p ∧ RePred fun a => ¬p a :=
fun h => ⟨h.to_re, h.not.to_re⟩, fun ⟨h₁, h₂⟩ =>
Expand Down
6 changes: 3 additions & 3 deletions Mathlib/Computability/TuringMachine.lean
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ instance Stmt.inhabited [Inhabited Γ] : Inhabited Stmt₀ :=
Both `Λ` and `Γ` are required to be inhabited; the default value
for `Γ` is the "blank" tape value, and the default value of `Λ` is
the initial state. -/
@[nolint inhabitedNonempty unusedArguments] -- this is a deliberate addition, see comment
@[nolint allOfThem unusedArguments] -- this is a deliberate addition, see comment
def Machine [Inhabited Λ] :=
Λ → Γ → Option (Λ × Stmt₀)

Expand Down Expand Up @@ -1019,7 +1019,7 @@ variable (M : Machine Γ Λ) (f₁ : PointedMap Γ Γ') (f₂ : PointedMap Γ'
/-- Because the state transition function uses the alphabet and machine states in both the input
and output, to map a machine from one alphabet and machine state space to another we need functions
in both directions, essentially an `Equiv` without the laws. -/
@[nolint inhabitedNonempty]
@[nolint allOfThem ]
def Machine.map : Machine Γ' Λ'
| q, l => (M (g₂ q) (f₂ l)).map (Prod.map g₁ (Stmt.map f₁))

Expand Down Expand Up @@ -1329,7 +1329,7 @@ def trAux (s : Γ) : Stmt₁ → σ → Λ'₁₀ × Stmt₀
local notation "Cfg₁₀" => TM0.Cfg Γ Λ'₁₀

/-- The translated TM0 machine (given the TM1 machine input). -/
@[nolint inhabitedNonempty]
@[nolint allOfThem ]
def tr : TM0.Machine Γ Λ'₁₀
| (none, _), _ => none
| (some q, v), s => some (trAux M s q v)
Expand Down
6 changes: 3 additions & 3 deletions Mathlib/Data/Fintype/Card.lean
Original file line number Diff line number Diff line change
Expand Up @@ -373,13 +373,13 @@ In this section we prove that `α : Type*` is `Finite` if and only if `Fintype
-/


@[nolint finiteFintype]
@[nolint allOfThem]
protected theorem Fintype.finite {α : Type*} (_inst : Fintype α) : Finite α :=
⟨Fintype.equivFin α⟩

/-- For efficiency reasons, we want `Finite` instances to have higher
priority than ones coming from `Fintype` instances. -/
@[nolint finiteFintype]
@[nolint allOfThem]
instance (priority := 900) Finite.of_fintype (α : Type*) [Fintype α] : Finite α :=
Fintype.finite ‹_›

Expand Down Expand Up @@ -838,7 +838,7 @@ instance (priority := 10) LinearOrder.isWellOrder_gt [LinearOrder α] : IsWellOr

end Finite

@[nolint finiteFintype]
@[nolint allOfThem]
protected theorem Fintype.false [Infinite α] (_h : Fintype α) : False :=
not_finite α

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/MLList/Split.lean
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Return a lazy lists of pairs, consisting of a value under that function,
and a maximal list of elements having that value.
-/
@[deprecated "See deprecation note in module documentation." (since := "2024-08-22"),
nolint decidableClassical]
nolint allOfThem]
partial def groupByM [DecidableEq β] (L : MLList m α) (f : α → m β) : MLList m (β × List α) :=
L.cases (fun _ => nil) fun a t => squash fun _ => do
let b ← f a
Expand Down
6 changes: 3 additions & 3 deletions Mathlib/Logic/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ protected theorem Function.mt {a b : Prop} : (a → b) → ¬b → ¬a := mt

/-! ### Declarations about `not` -/

@[nolint decidableClassical]
@[nolint allOfThem]
alias dec_em := Decidable.em

@[nolint decidableClassical]
@[nolint allOfThem]
theorem dec_em' (p : Prop) [Decidable p] : ¬p ∨ p := (dec_em p).symm

alias em := Classical.em
Expand Down Expand Up @@ -211,7 +211,7 @@ theorem not_ne_iff {α : Sort*} {a b : α} : ¬a ≠ b ↔ a = b := not_not

theorem of_not_imp : ¬(a → b) → a := Decidable.of_not_imp

@[nolint decidableClassical]
@[nolint allOfThem]
alias Not.decidable_imp_symm := Decidable.not_imp_symm

theorem Not.imp_symm : (¬a → b) → ¬b → a := Not.decidable_imp_symm
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Logic/Encodable/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -507,13 +507,13 @@ theorem choose_spec (h : ∃ x, p x) : p (choose h) :=
end FindA

/-- A constructive version of `Classical.axiom_of_choice` for `Encodable` types. -/
@[nolint decidableClassical]
@[nolint allOfThem]
theorem axiom_of_choice {α : Type*} {β : α → Type*} {R : ∀ x, β x → Prop} [∀ a, Encodable (β a)]
[∀ x y, Decidable (R x y)] (H : ∀ x, ∃ y, R x y) : ∃ f : ∀ a, β a, ∀ x, R x (f x) :=
fun x => choose (H x), fun x => choose_spec (H x)⟩

/-- A constructive version of `Classical.skolem` for `Encodable` types. -/
@[nolint decidableClassical]
@[nolint allOfThem]
theorem skolem {α : Type*} {β : α → Type*} {P : ∀ x, β x → Prop} [∀ a, Encodable (β a)]
[∀ x y, Decidable (P x y)] : (∀ x, ∃ y, P x y) ↔ ∃ f : ∀ a, β a, ∀ x, P x (f x) :=
⟨axiom_of_choice, fun ⟨_, H⟩ x => ⟨_, H x⟩⟩
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Order/Heyting/Regular.lean
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ theorem isRegular_of_boolean : ∀ a : α, IsRegular a :=
compl_compl

/-- A decidable proposition is intuitionistically Heyting-regular. -/
@[nolint decidableClassical]
@[nolint allOfThem]
theorem isRegular_of_decidable (p : Prop) [Decidable p] : IsRegular p :=
propext <| Decidable.not_not

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Tactic/Linter/UnusedAssumptionInType.lean
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def checkUnusedAssumptionInType (declInfo : ConstantInfo) (typesToAvoid : Array
let names := #[`Decidable, `DecidableEq, `DecidablePred, `Inhabited, `Fintype, `Encodable]
return ← checkUnusedAssumptionInType (← getConstInfo declName) names

/--/
/-
/--
Linter that checks for theorems that assume `[Decidable p]`
but don't use this assumption in the type.
Expand Down

0 comments on commit 3461abe

Please sign in to comment.