-
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.
Adding the MP+CP+F example and a few minor tweaks.
- Loading branch information
Showing
5 changed files
with
103 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// | ||
// MPCPFexample.js - loads a giant string that contains a good example | ||
|
||
const fs = require('fs') | ||
|
||
// we keep it in a separate text file for syntax highlighting purposes | ||
const MPCPFstr = fs.readFileSync(__dirname+'/MPCPFexampleTxt.js', 'utf8') | ||
|
||
module.exports.MPCPFstr = MPCPFstr |
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,63 @@ | ||
// | ||
// MPCPFexampleTxt.js - stores a giant string that contains a good example | ||
// of validation by MP+CP+F | ||
|
||
{ ////// header | ||
// factoring these out to reduce clutter | ||
:{ Declare{ ⊆ = ∈ ⇒ { } } | ||
// EEs (misnomer, but no big deal for now) | ||
{ :Let{ x ∈(x,∩(A,B)) } ∈(x,∩(A,B)) } | ||
{ :Let{ y ∈(y,A) } ∈(y,A) } | ||
// UEs from first pass of MP+CP+F validation | ||
{ :{ ⊆(S,S) } | ||
{ ⊆(A,A) }} | ||
{ :{ :∈(z,∩(S,T)) ∈(z,S) ∈(z,T) } | ||
{ :∈(x,∩(A,B)) ∈(x,A) ∈(x,B) }} | ||
{ :{ :⊆(S,T) :∈(z,S) ∈(z,T) } | ||
{ :⊆(A,B) :∈(y,A) ∈(y,B) }} | ||
{ :{ :∈(z,S) :∈(z,T) ∈(z,∩(S,T)) } | ||
{ :∈(y,A) :∈(y,B) ∈(y,∩(A,B)) }} | ||
// UEs from the second pass of MP+CP+F validation | ||
{ :{ :{ :Let{ z ∈(z,S) } ∈(z,T) } ⊆(S,T) } | ||
{ :{ :Let{ x ∈(x,∩(A,B)) } ∈(x,A) } ⊆(∩(A,B),A) } } | ||
{ :{ :{ :Let{ z ∈(z,S) } ∈(z,T) } ⊆(S,T) } | ||
{ :{ :Let{ y ∈(y,A) } ∈(y,∩(A,B)) } ⊆(A,∩(A,B)) } } | ||
// UEs from third pass of MP+CP+F validation | ||
{ :{ :⊆(S,T) :⊆(T,S) =(S,T) } | ||
{ :⊆(∩(A,B),A) :⊆(A,∩(A,B)) =(∩(A,B),A) }} | ||
// UEs from fourth pass of MP+CP+F validation | ||
{ :{ :{ :P Q } ⇒(P,Q) } | ||
{ :{ :⊆(A,B) =(∩(A,B),A) } ⇒(⊆(A,B),=(∩(A,B),A)) }} | ||
} | ||
|
||
////// dependencies (hidden) | ||
:Declare{ ⊆ = ∈ ⇒ { } } // constant declarations | ||
:{ :{ :P Q } ⇒(P,Q) } // implies+ | ||
:{ :⊆(S,T) :∈(z,S) ∈(z,T) } // subset- | ||
:{ :{ :Let{ z ∈(z,S) } ∈(z,T) } ⊆(S,T) } // subset+ | ||
:{ :⊆(S,T) :⊆(T,S) =(S,T) } // set equality+ | ||
:{ :∈(z,S) :∈(z,T) ∈(z,∩(S,T)) } // intersection+ | ||
:{ :∈(z,∩(S,T)) ∈(z,S) ∈(z,T) } // intersection- | ||
:{ ⊆(S,S) } // previous theorem | ||
|
||
////// user's document (visible) | ||
// Theorem 1 | ||
{ =(∩(A,A),A) } | ||
// Proof of Theorem 1 | ||
{ ⊆(A,A) } | ||
// Theorem 2 | ||
{ ⇒(⊆(A,B),=(∩(A,B),A)) } | ||
// Proof of Theorem 2 | ||
{ :⊆(A,B) | ||
=(∩(A,B),A) | ||
⊆(∩(A,B),A) | ||
{ :Let{ x ∈(x,∩(A,B)) } | ||
∈(x,A) | ||
} | ||
⊆(A,∩(A,B)) | ||
{ :Let{ y ∈(y,A) } | ||
∈(y,B) | ||
∈(y,∩(A,B)) | ||
} | ||
} | ||
} |