Skip to content

リンターオプションを追加する #959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions LeanByExample/Reference/Tactic/Induction.lean
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ example (n : Nat) : fibonacci n = fib n := by

-- 帰納法の仮定から、`n` と `n + 1` については成り立つ
have ih_n := ih n
have ih_succ := ih $ n + 1
have ih_succ := ih (n + 1)

-- 帰納法の仮定を適用して示す
simp [ih_n, ih_succ]
Expand All @@ -146,7 +146,7 @@ theorem fib_eq (n : Nat) : fibonacci n = fib n := by

-- 帰納法の仮定から、`n` と `n + 1` については成り立つ
have ih_n := fib_eq n
have ih_succ := fib_eq $ n + 1
have ih_succ := fib_eq (n + 1)

-- 帰納法の仮定を適用して示す
simp [ih_n, ih_succ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class Semilatticeinf (α : Type) extends Inf α, PartialOrder α where
/-- `a ⊓ b` は `a`, `b` の下界の中で最大のもの -/
le_inf : ∀ a b c : α, c ≤ a → c ≤ b → c ≤ a ⊓ b

set_option structureDiamondWarning false in --#
/-- 束 -/
class Lattice (α : Type) extends SemilatticeSup α, Semilatticeinf α

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class Semilatticeinf (α : Type) extends Inf α, PartialOrder α where
/-- `a ⊓ b` は `a`, `b` の下界の中で最大のもの -/
le_inf : ∀ a b c : α, c ≤ a → c ≤ b → c ≤ a ⊓ b

set_option structureDiamondWarning false in --#
/-- 束 -/
class Lattice (α : Type) extends SemilatticeSup α, Semilatticeinf α

Expand Down
19 changes: 13 additions & 6 deletions lakefile.lean
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
import Lake
open Lake DSL

abbrev linterOptions : Array LeanOption := #[
⟨`linter.flexible, true⟩,
⟨`linter.oldObtain, true⟩,
⟨`linter.style.cdot, true⟩,
⟨`linter.style.dollarSyntax, true⟩,
⟨`linter.style.missingEnd, true⟩,
⟨`linter.style.lambdaSyntax, true⟩,
⟨`structureDiamondWarning, true⟩
]

package «Lean by Example» where
leanOptions := #[
⟨`autoImplicit, false⟩,
⟨`relaxedAutoImplicit, false⟩,
⟨`weak.linter.flexible, true⟩
]
moreServerOptions := #[
⟨`linter.flexible, true⟩
]
⟨`relaxedAutoImplicit, false⟩
] ++ linterOptions.map (fun s ↦ {s with name := `weak ++ s.name})
moreServerOptions := linterOptions

require «mk-exercise» from git
"https://github.com/Seasawher/mk-exercise.git" @ "main"
Expand Down