-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0def6e7
commit 6be422d
Showing
4 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Batteries.Tactic.OpenPrivate | ||
|
||
open private mk from Lean.Environment | ||
|
||
open Lean in | ||
elab "add_false" : command => do | ||
modifyEnv fun env => | ||
let constants := env.constants.insert `false $ ConstantInfo.thmInfo | ||
{ name := `false, levelParams := [], type := .const ``False [], value := .const ``False [] } | ||
-- Before `Environment.mk` became private, we could just use | ||
-- `{ env with constants }` | ||
mk env.const2ModIdx constants env.extensions env.extraConstNames env.header | ||
|
||
add_false | ||
|
||
theorem falseThm : False := | ||
false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
|
||
|
||
|
||
theorem falseThm : False := sorry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import Batteries.Tactic.OpenPrivate | ||
|
||
open private mk from Lean.Environment | ||
|
||
open Lean in | ||
elab "add_false_constructor" : command => do | ||
modifyEnv fun env => | ||
let constants := env.constants.insert `False.intro $ ConstantInfo.ctorInfo | ||
{ name := `False.intro | ||
levelParams := [] | ||
type := .const ``False [] | ||
induct := `False | ||
cidx := 0 | ||
numParams := 0 | ||
numFields := 0 | ||
isUnsafe := false } | ||
-- Before `Environment.mk` became private, we could just use | ||
-- `{ env with constants }` | ||
mk env.const2ModIdx constants env.extensions env.extraConstNames env.header | ||
|
||
add_false_constructor | ||
|
||
theorem falseThm : False := | ||
False.intro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
theorem falseThm : False := sorry |