Knowledge Graph Conference
May 2024
Joshua Shinavier, PhD
jshinavier@microsoft.com
Graphs, Logic, and Lambda Calculus |
Graphs
Curry-Howard Correspondence
Curry-Howard Correspondence
| Logic | Lambda Calculus | |
| | | |
| | | |
| | | |
| Logic | Lambda Calculus | |
| | | |
| | | |
| | | |
| Logic | Lambda Calculus | |
| proposition | type | |
| | | |
| | | |
| Logic | Lambda Calculus | |
| proposition | type | |
| proof | term | |
| | | |
| | | |
| Logic | Lambda Calculus | |
| proposition | type | |
| proof | term | |
| conjunction | product type | |
| disjunction | sum type | |
| basic predicate | primitive type | |
| universal quantification | forall type | |
| implication | function type | |
| | | |
| | | |
| Logic | Lambda Calculus | |
| proposition | type | |
| proof | term | |
| conjunction | product type | |
| disjunction | sum type | |
| basic predicate | primitive type | |
| universal quantification | forall type | |
| implication | function type | |
| proposition(constant) | constant term | |
| conjunction of proofs | tuple / record | |
| disjunction of proofs | injection / variant | |
| projection function | projection | |
| disjunction of equalities | case statement | |
| predicate definition | lambda term | |
| predicate | primitive function | |
| variable substitution | let term | |
Graphs | Logic | Lambda Calculus | |
| proposition | type | |
| proof | term | |
| conjunction | product type | |
| disjunction | sum type | |
| basic predicate | primitive type | |
| universal quantification | forall type | |
| implication | function type | |
| proposition(constant) | constant term | |
| conjunction of proofs | tuple / record | |
| disjunction of proofs | injection / variant | |
| projection function | projection | |
| disjunction of equalities | case statement | |
| predicate definition | lambda term | |
| predicate | primitive function | |
| variable substitution | let term | |
Graphs | Logic | Lambda Calculus | |
? | proposition | type | |
? | proof | term | |
? | conjunction | product type | |
? | disjunction | sum type | |
? | basic predicate | primitive type | |
? | universal quantification | forall type | |
? | implication | function type | |
? | proposition(constant) | constant term | |
? | conjunction of proofs | tuple / record | |
? | disjunction of proofs | injection / variant | |
? | projection function | projection | |
? | disjunction of equalities | case statement | |
? | predicate definition | lambda term | |
? | predicate | primitive function | |
? | variable substitution | let term | |
Graphs | Logic | Lambda Calculus | |
type / label | proposition | type | Person |
? | proof | term | |
? | conjunction | product type | |
? | disjunction | sum type | |
? | basic predicate | primitive type | |
? | universal quantification | forall type | |
? | implication | function type | |
? | proposition(constant) | constant term | |
? | conjunction of proofs | tuple / record | |
? | disjunction of proofs | injection / variant | |
? | projection function | projection | |
? | disjunction of equalities | case statement | |
? | predicate definition | lambda term | |
? | predicate | primitive function | |
? | variable substitution | let term | |
Graphs | Logic | Lambda Calculus | |
type / label | proposition | type | Person |
typed value / labeled element | proof | term | g.addV('Person') |
? | conjunction | product type | |
? | disjunction | sum type | |
? | basic predicate | primitive type | |
? | universal quantification | forall type | |
? | implication | function type | |
? | proposition(constant) | constant term | |
? | conjunction of proofs | tuple / record | |
? | disjunction of proofs | injection / variant | |
? | projection function | projection | |
? | disjunction of equalities | case statement | |
? | predicate definition | lambda term | |
? | predicate | primitive function | |
? | variable substitution | let term | |
Graphs | Logic | Lambda Calculus | |
type / label | proposition | type | Person |
typed value / labeled element | proof | term | g.addV('Person') |
record type / element type | conjunction | product type | {out:Person, in:Organization} |
? | disjunction | sum type | |
? | basic predicate | primitive type | |
? | universal quantification | forall type | |
? | implication | function type | |
? | proposition(constant) | constant term | |
? | conjunction of proofs | tuple / record | |
? | disjunction of proofs | injection / variant | |
? | projection function | projection | |
? | disjunction of equalities | case statement | |
? | predicate definition | lambda term | |
? | predicate | primitive function | |
? | variable substitution | let term | |
Graphs | Logic | Lambda Calculus | |
type / label | proposition | type | Person |
typed value / labeled element | proof | term | g.addV('Person') |
record type / element type | conjunction | product type | {out:Person, in:Organization} |
union of types | disjunction | sum type | Piano | Pizza |
? | basic predicate | primitive type | |
? | universal quantification | forall type | |
? | implication | function type | |
? | proposition(constant) | constant term | |
? | conjunction of proofs | tuple / record | |
? | disjunction of proofs | injection / variant | |
? | projection function | projection | |
? | disjunction of equalities | case statement | |
? | predicate definition | lambda term | |
? | predicate | primitive function | |
? | variable substitution | let term | |
Graphs | Logic | Lambda Calculus | |
type / label | proposition | type | Person |
typed value / labeled element | proof | term | g.addV('Person') |
record type / element type | conjunction | product type | {out:Person, in:Organization} |
union of types | disjunction | sum type | Piano | Pizza |
property type | basic predicate | primitive type | string |
? | universal quantification | forall type | |
? | implication | function type | |
? | proposition(constant) | constant term | |
? | conjunction of proofs | tuple / record | |
? | disjunction of proofs | injection / variant | |
? | projection function | projection | |
? | disjunction of equalities | case statement | |
? | predicate definition | lambda term | |
? | predicate | primitive function | |
? | variable substitution | let term | |
Graphs | Logic | Lambda Calculus | |
type / label | proposition | type | Person |
typed value / labeled element | proof | term | g.addV('Person') |
record type / element type | conjunction | product type | {out:Person, in:Organization} |
union of types | disjunction | sum type | Piano | Pizza |
property type | basic predicate | primitive type | string |
polymorphic element type | universal quantification | forall type | DeliveryService<Truck, Piano> |
? | implication | function type | |
? | proposition(constant) | constant term | |
? | conjunction of proofs | tuple / record | |
? | disjunction of proofs | injection / variant | |
? | projection function | projection | |
? | disjunction of equalities | case statement | |
? | predicate definition | lambda term | |
? | predicate | primitive function | |
? | variable substitution | let term | |
Graphs | Logic | Lambda Calculus | |
type / label | proposition | type | Person |
typed value / labeled element | proof | term | g.addV('Person') |
record type / element type | conjunction | product type | {out:Person, in:Organization} |
union of types | disjunction | sum type | Piano | Pizza |
property type | basic predicate | primitive type | string |
polymorphic element type | universal quantification | forall type | DeliveryService<Truck, Piano> |
"active" element or value type | implication | function type | Function<Piano, Company> |
? | proposition(constant) | constant term | |
? | conjunction of proofs | tuple / record | |
? | disjunction of proofs | injection / variant | |
? | projection function | projection | |
? | disjunction of equalities | case statement | |
? | predicate definition | lambda term | |
? | predicate | primitive function | |
? | variable substitution | let term | |
Graphs | Logic | Lambda Calculus | |
type / label | proposition | type | Person |
typed value / labeled element | proof | term | g.addV('Person') |
record type / element type | conjunction | product type | {out:Person, in:Organization} |
union of types | disjunction | sum type | Piano | Pizza |
property type | basic predicate | primitive type | string |
polymorphic element type | universal quantification | forall type | DeliveryService<Truck, Piano> |
"active" element or value type | implication | function type | Function<Piano, Company> |
property value | proposition(constant) | constant term | "Arthur Dent" |
? | conjunction of proofs | tuple / record | |
? | disjunction of proofs | injection / variant | |
? | projection function | projection | |
? | disjunction of equalities | case statement | |
? | predicate definition | lambda term | |
? | predicate | primitive function | |
? | variable substitution | let term | |
Graphs | Logic | Lambda Calculus | |
type / label | proposition | type | Person |
typed value / labeled element | proof | term | g.addV('Person') |
record type / element type | conjunction | product type | {out:Person, in:Organization} |
union of types | disjunction | sum type | Piano | Pizza |
property type | basic predicate | primitive type | string |
polymorphic element type | universal quantification | forall type | DeliveryService<Truck, Piano> |
"active" element or value type | implication | function type | Function<Piano, Company> |
property value | proposition(constant) | constant term | "Arthur Dent" |
element and properties | conjunction of proofs | tuple / record | g.addV('Person').property('... |
? | disjunction of proofs | injection / variant | |
? | projection function | projection | |
? | disjunction of equalities | case statement | |
? | predicate definition | lambda term | |
? | predicate | primitive function | |
? | variable substitution | let term | |
Graphs | Logic | Lambda Calculus | |
type / label | proposition | type | Person |
typed value / labeled element | proof | term | g.addV('Person') |
record type / element type | conjunction | product type | {out:Person, in:Organization} |
union of types | disjunction | sum type | Piano | Pizza |
property type | basic predicate | primitive type | string |
polymorphic element type | universal quantification | forall type | DeliveryService<Truck, Piano> |
"active" element or value type | implication | function type | Function<Piano, Company> |
property value | proposition(constant) | constant term | "Arthur Dent" |
element and properties | conjunction of proofs | tuple / record | g.addV('Person').property('... |
variant element | disjunction of proofs | injection / variant | g.addV('Pizza') |
? | projection function | projection | |
? | disjunction of equalities | case statement | |
? | predicate definition | lambda term | |
? | predicate | primitive function | |
? | variable substitution | let term | |
Graphs | Logic | Lambda Calculus | |
type / label | proposition | type | Person |
typed value / labeled element | proof | term | g.addV('Person') |
record type / element type | conjunction | product type | {out:Person, in:Organization} |
union of types | disjunction | sum type | Piano | Pizza |
property type | basic predicate | primitive type | string |
polymorphic element type | universal quantification | forall type | DeliveryService<Truck, Piano> |
"active" element or value type | implication | function type | Function<Piano, Company> |
property value | proposition(constant) | constant term | "Arthur Dent" |
element and properties | conjunction of proofs | tuple / record | g.addV('Person').property('... |
variant element | disjunction of proofs | injection / variant | g.addV('Pizza') |
tail / head / lookup | projection function | projection | e.outV().get('name') |
? | disjunction of equalities | case statement | |
? | predicate definition | lambda term | |
? | predicate | primitive function | |
? | variable substitution | let term | |
Graphs | Logic | Lambda Calculus | |
type / label | proposition | type | Person |
typed value / labeled element | proof | term | g.addV('Person') |
record type / element type | conjunction | product type | {out:Person, in:Organization} |
union of types | disjunction | sum type | Piano | Pizza |
property type | basic predicate | primitive type | string |
polymorphic element type | universal quantification | forall type | DeliveryService<Truck, Piano> |
"active" element or value type | implication | function type | Function<Piano, Company> |
property value | proposition(constant) | constant term | "Arthur Dent" |
element and properties | conjunction of proofs | tuple / record | g.addV('Person').property('... |
variant element | disjunction of proofs | injection / variant | g.addV('Pizza') |
tail / head / lookup | projection function | projection | e.outV().get('name') |
pattern match | disjunction of equalities | case statement | e.choose(...).option(... |
? | predicate definition | lambda term | |
? | predicate | primitive function | |
? | variable substitution | let term | |
Graphs | Logic | Lambda Calculus | |
type / label | proposition | type | Person |
typed value / labeled element | proof | term | g.addV('Person') |
record type / element type | conjunction | product type | {out:Person, in:Organization} |
union of types | disjunction | sum type | Piano | Pizza |
property type | basic predicate | primitive type | string |
polymorphic element type | universal quantification | forall type | DeliveryService<Truck, Piano> |
"active" element or value type | implication | function type | Function<Piano, Company> |
property value | proposition(constant) | constant term | "Arthur Dent" |
element and properties | conjunction of proofs | tuple / record | g.addV('Person').property('... |
variant element | disjunction of proofs | injection / variant | g.addV('Pizza') |
tail / head / lookup | projection function | projection | e.outV().get('name') |
pattern match | disjunction of equalities | case statement | e.choose(...).option(... |
"active" element or value | predicate definition | lambda term | g.V().filter{it.get()... |
? | predicate | primitive function | |
? | variable substitution | let term | |
Graphs | Logic | Lambda Calculus | |
type / label | proposition | type | Person |
typed value / labeled element | proof | term | g.addV('Person') |
record type / element type | conjunction | product type | {out:Person, in:Organization} |
union of types | disjunction | sum type | Piano | Pizza |
property type | basic predicate | primitive type | string |
polymorphic element type | universal quantification | forall type | DeliveryService<Truck, Piano> |
"active" element or value type | implication | function type | Function<Piano, Company> |
property value | proposition(constant) | constant term | "Arthur Dent" |
element and properties | conjunction of proofs | tuple / record | g.addV('Person').property('... |
variant element | disjunction of proofs | injection / variant | g.addV('Pizza') |
tail / head / lookup | projection function | projection | e.outV().get('name') |
pattern match | disjunction of equalities | case statement | e.choose(...).option(... |
"active" element or value | predicate definition | lambda term | g.V().filter{it.get()... |
primitive function | predicate | primitive function | lTrim() |
? | variable substitution | let term | |
Graphs | Logic | Lambda Calculus | |
type / label | proposition | type | Person |
typed value / labeled element | proof | term | g.addV('Person') |
record type / element type | conjunction | product type | {out:Person, in:Organization} |
union of types | disjunction | sum type | Piano | Pizza |
property type | basic predicate | primitive type | string |
polymorphic element type | universal quantification | forall type | DeliveryService<Truck, Piano> |
"active" element or value type | implication | function type | Function<Piano, Company> |
property value | proposition(constant) | constant term | "Arthur Dent" |
element and properties | conjunction of proofs | tuple / record | g.addV('Person').property('... |
variant element | disjunction of proofs | injection / variant | g.addV('Pizza') |
tail / head / lookup | projection function | projection | e.outV().get('name') |
pattern match | disjunction of equalities | case statement | e.choose(...).option(... |
"active" element or value | predicate definition | lambda term | g.V().filter{it.get()... |
primitive function | predicate | primitive function | lTrim() |
graph | variable substitution | let term | e.as('a') |
Types
[...]
Terms
[...]
Typing rules
Typing rules
Graphs as terms
let x = 10
y = 32
z = x + y in z
let x = 10
y = 32
z = x + y in z
let p1 = Person {name = "Joshua", twitter = "joshsh"}
p2 = Person {name = "Deborah", twitter = "dlmcguinness"}
p3 = Person {name = "Alastair"}
p4 = Person {name = "Molham", twitter = "molhamaref"}
p5 = Person {name = "Ora", twitter = "oralassila"}
f12 = follows {_out = p1, _in = p2}
f14 = follows {_out = p1, _in = p4}
f15 = follows {_out = p1, _in = p5}
f21 = follows {_out = p2, _in = p1}
f25 = follows {_out = p2, _in = p5}
f45 = follows {_out = p4, _in = p5}
f51 = follows {_out = p5, _in = p1}
f52 = follows {_out = p5, _in = p2}
in {}
let p1 = Person {name = "Joshua", twitter = "joshsh"}
p2 = Person {name = "Deborah", twitter = "dlmcguinness"}
p3 = Person {name = "Alastair"}
p4 = Person {name = "Molham", twitter = "molhamaref"}
p5 = Person {name = "Ora", twitter = "oralassila"}
s1 = Session {name = "Graph Standards Rebooted"}
f12 = follows {_out = p1, _in = p2}
f14 = follows {_out = p1, _in = p4}
f15 = follows {_out = p1, _in = p5}
f21 = follows {_out = p2, _in = p1}
f25 = follows {_out = p2, _in = p5}
f45 = follows {_out = p4, _in = p5}
f51 = follows {_out = p5, _in = p1}
f52 = follows {_out = p5, _in = p2}
m11 = moderator {_out = s1, _in = p1}
p12 = panelist {_out = s1, _in = p2}
p13 = panelist {_out = s1, _in = p3}
p14 = panelist {_out = s1, _in = p4}
p15 = panelist {_out = s1, _in = p5}
in {}
let p1 = Person {name = "Joshua", twitter = "joshsh"}
p2 = Person {name = "Deborah", twitter = "dlmcguinness"}
p3 = Person {name = "Alastair"}
p4 = Person {name = "Molham", twitter = "molhamaref"}
p5 = Person {name = "Ora", twitter = "oralassila"}
s1 = Session {name = "Graph Standards Rebooted"}
f12 = follows {_out = p1, _in = p2}
f14 = follows {_out = p1, _in = p4}
f15 = follows {_out = p1, _in = p5}
f21 = follows {_out = p2, _in = p1}
f25 = follows {_out = p2, _in = p5}
f45 = follows {_out = p4, _in = p5}
f51 = follows {_out = p5, _in = p1}
f52 = follows {_out = p5, _in = p2}
m11 = moderator {_out = s1, _in = p1}
p12 = panelist {_out = s1, _in = p2}
p13 = panelist {_out = s1, _in = p3}
p14 = panelist {_out = s1, _in = p4}
p15 = panelist {_out = s1, _in = p5}
in SessionInfo {created = "2024-05-01T17:32:41Z",
lastUpdated = "2024-05-06T08:51:03Z"}
let p1 = Person {name = "Joshua",
twitter = "joshsh",
follows = [p2, p4, p5]}
p2 = Person {name = "Deborah",
twitter = "dlmcguinness",
follows = [p1, p5]}
p3 = Person {name = "Alastair",
follows = []}
p4 = Person {name = "Molham",
twitter = "molhamaref",
follows = [p5]}
p5 = Person {name = "Ora",
twitter = "oralassila",
follows = [p1, p2]}
in let s1 = Session {name = "Graph Standards Rebooted",
moderator = p1,
panelists = [p2, p3, p4, p5]}
in SessionInfo {session = s1,
created = "2024-05-01T17:32:41Z",
lastUpdated = "2024-05-06T08:51:03Z"}
let p1 = Person {name = "Joshua",
twitter = "joshsh",
follows = [p2, p4, p5]}
p2 = Person {name = "Deborah",
twitter = "dlmcguinness",
follows = [p1, p5]}
p3 = Person {name = "Alastair",
follows = []}
p4 = Person {name = "Molham",
twitter = "molhamaref",
follows = [p5]}
p5 = Person {name = "Ora",
twitter = "oralassila",
follows = [p1, p2]}
in let s1 = Session {name = "Graph Standards Rebooted",
moderator = p1,
panelists = [p2, p3, p4, p5]}
in let sessionSize = λs . 1 + (length s.panelists)
in SessionInfo {session = s1, size = sessionSize s1,
created = "2024-05-01T17:32:41Z",
lastUpdated = "2024-05-06T08:51:03Z"}
Schema graph (LPG)
Schema graph (hypergraph)
Graphs, Logic, and Lambda Calculus |