lean-ja / lean-ja/lean-by-example
公理を書き換えて任意の命題を示せてしまう例。偽証明の例。
Open
Nobody has claimed this yet.
コード例
メタプログラミング
- Dominant language
- Lean
- Stars
- 188
- Forks
- 15
- Avg merge
- 9h 8m
- Merged PRs (30d)
- 6
Description
import Batteries.Tactic.OpenPrivate
/- Redefine `propext : False`. -/
open Lean Elab Meta in
open private Environment.mk from Lean.Environment in
#eval modifyEnv (m := MetaM) fun env =>
let consts :=
{ env.constants with
map₁ := env.constants.map₁.insert ``propext (.axiomInfo {
name := ``propext
type := .const ``False []
levelParams := []
isUnsafe := false
})
}
Environment.mk env.const2ModIdx consts env.extensions env.extraConstNames env.header
theorem efsq : ∀ (x y z n : Nat),
0 < x → 0 < y → 0 < z → 2 < n →
x^n + y^n ≠ z^n := by
exfalso
exact propext
-- 'efsq' depends on axioms: [propext]
#print axioms efsq
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked Zulip discussion and reproducing the Lean snippet in the issue. The issue does not name a repository file, test, or requested change; completion would require a maintainer decision about whether this behavior is a bug and what remedy or documentation is appropriate.
Written by the indexing model from the issue text.
Assessment
- Domain
- security
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100