-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* WIP add opaque command The opaque command allow to set a defined symbol opaque * Fix review comments * Make opaque symbol injective * Use bool ref for sym_opaque type * Fix warning and PR comment * Modify doc and BNF to mention opaque command * Remove modifier list for Inductive type Remove shift/reduce conflicts with opaque command, and property modifiers cannot be used on inductive types * Make possible to opacify symbol defined in another file * fix fold_command opaque case and modify scope_rule error message for opaque symbol * Update CHANGES.md * Add warning message if symbol is already opaque, and add exposition modifier for inductive type Inductive type can not use property modifiers but can use expositions modifiers: private, protected --------- Co-authored-by: Frédéric Blanqui <[email protected]>
- Loading branch information
Showing
14 changed files
with
92 additions
and
18 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
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
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
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
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
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
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
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
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
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
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
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
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
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,43 @@ | ||
// Classical logic Gödel–Gentzen negative translation | ||
constant symbol Prop : TYPE; | ||
|
||
builtin "Prop" ≔ Prop; | ||
|
||
injective symbol π : Prop → TYPE; // `p | ||
builtin "P" ≔ π; | ||
|
||
symbol ⊥: Prop; | ||
symbol a: Prop; | ||
|
||
constant symbol ⇒ : Prop → Prop → Prop; notation ⇒ infix right 5; // => | ||
rule π ($p ⇒ $q) ↪ π $p → π $q; | ||
|
||
symbol ¬ p ≔ p ⇒ ⊥; notation ¬ prefix 35; | ||
|
||
constant symbol ∨ : Prop → Prop → Prop; notation ∨ infix left 6; // \/ or \vee | ||
constant symbol ∨ᵢ₁ [p q] : π p → π (p ∨ q); | ||
|
||
symbol πᶜ p ≔ π (¬ ¬ p); | ||
|
||
symbol ∨ᶜ p q ≔ (¬ ¬ p) ∨ (¬ ¬ q); notation ∨ᶜ infix right 20; | ||
|
||
opaque symbol ∨ᶜᵢ₁ [p q] : πᶜ p → πᶜ (p ∨ᶜ q) ≔ | ||
begin | ||
simplify; | ||
assume p q Hnnp; | ||
assume Hnnp_or_nnq; | ||
apply Hnnp_or_nnq; | ||
apply ∨ᵢ₁; | ||
refine Hnnp; | ||
end; | ||
|
||
opaque πᶜ; | ||
opaque ∨ᶜ; | ||
|
||
opaque symbol ∨ᶜᵢ₁' [p q] : πᶜ p → πᶜ (p ∨ᶜ q) ≔ | ||
begin | ||
assume p q Hp; | ||
simplify; | ||
apply ∨ᶜᵢ₁; | ||
apply Hp; | ||
end; |