Adaptive Logic for Inductive Computing
Adapt to reality with reason
2025 James B. Wilson

https://slides.com/jameswilson-3/adaptive-logic/
Law: In 2025 all passports must be
e-readable* or
be issued prior to 2020.
Your job: make the airport automated turnstiles obey this law!
*Fitted with NFC tags.
1. Critique this default solution
(use a syntax of your choosing).
type passport_status =
| EReadable
| IssuedBefore2020
type scan_status =
| Checked(checksum)
| Failed
let classify_passport (
scan : scan_result ) :
passport_status =
match scan with
| Checked(checksum) -> EReadable
| Failed -> IssuedBefore2020class PassStatus
case class EReadable() extends PassStatus
case class Before2020() extends PassStatus
sealed
class ScanStatus
case class Checked(sum:Int) extends ScanStatus
case class Failed() extends ScanStatus
sealed
def classifyPassport (
scan : ScanResult ) : PassStatus =
scan match {
case Checked(checksum) => EReadable()
case Failed() => Before2020()
}OCaml
Scala
1. Critique this default solution
(use a syntax of your choosing).
type passport_status =
| EReadable
| IssuedBefore2020
type scan_status =
| Checked(checksum)
| Failed
let classify_passport (
scan : scan_result ) :
passport_status =
match scan with
| Checked(checksum) -> EReadable
| Failed -> IssuedBefore2020OCaml
\(\mathbb{P}\) passport algebra with operators
\[E:\mathbb{P}^0\to \mathbb{P}\]
\[O:\mathbb{P}^0\to\mathbb{P}\]
\(\mathbb{S}\) scan algebra with operators
\[C(checksum):\mathbb{P}^0\to \mathbb{P}\]
\[F:\mathbb{P}^0\to\mathbb{P}\]
\(f:\mathbb{S}\to\mathbb{P}\) homomorphism
- \(f(C(sum)) = E\)
- \(f(F)=O\)
Analize a failure
-
Law: have e-readable or before 2020.
-
You scan a passport but it fails.
-
You have an old passport, get out of line go to back of manual entry!
As sequent calculus
- \(E\equiv\) e-readable,
- \(O\equiv\) before 2020.
- \(\Gamma\vdash E\vee O\)
- \(\Gamma\vdash \neg E\)
- \(\Gamma\vdash_{KL} O\) by Disjunctive Syllogism \[\vdash_{KL}\frac{\neg E, E\vee O}{O}\]
2. CRITIQUE THIS OUTCOME
KL="K"lassical Logic
Re-analize in Logic of Paradox (LP)
-
Law: have e-readable or before 2020.
-
You scan a passport but it fails.
-
Maybe you have an old passport, or maybe an e-readable one that doesn't scan.
As sequent calculus
- \(E\equiv\) e-readable,
- \(O\equiv\) before 2020.
- \(\Gamma\vdash E\vee O\)
- \(\Gamma\vdash \neg E\)
- \(\Gamma\vdash_{LP} O\vee (\neg E\wedge E)\) by \[\vdash_{LP} \frac{\neg E, E\vee O}{(\neg E\wedge E)\vee O}\]
LP we can entail \(\neg E\wedge E\)
3. CRITIQUE THIS OUTCOME
"Tri"-analize in Adaptive Logic (AP):
Use KL as long as no abnormalities.
Then switch to LP to fix abnormalities and continue in KL.
#
1
2
3
Claim
\[\Gamma\vdash E\vee O\]
Reason
Default
Condition
\[\Gamma\vdash \neg E\]
Scan
\[\emptyset\]
\[\emptyset\]
\[\Gamma\vdash_{AL} O\]
Dis. Syll(1,2)
\[\neg(\neg E\wedge E)\]
So this is KL except at the end where we use KL and label it as "conditional" on avoiding the abnormal case of LP.
\[\vdash_{LP} \frac{\neg E, E\vee O}{(\neg E\wedge E)\vee O}\]
type passport_status =
| EReadable
| IssuedBefore2020
type scan_status =
| Checked(checksum)
| Failed
let classify_passport (
scan : scan_result ) :
maybe passport_status =
match scan with
| Checked(checksum) -> just EReadable
| Failed -> print "If you passport is new than 2020"
print "clean scanner and retry;"
print "else go to manual line."
noneNew event:
officer comes over,
cleans the scanner,
you rescan this time it works.
4. Add 4th row, and derive its consequences in KL
"Tri"-analize in Adaptive Logic (AP):
Use KL as long as no abnormalities. \(\Gamma\)
Then switch to LP to DEFEAT abnormalities and continue in KL.
#
1
2
3
4
5
Claim
\[\Gamma\vdash E\vee O\]
Reason
Default
Condition
Feasible?
\[\Gamma\vdash \neg E\]
Scan
\[\emptyset\]
\[\emptyset\]
CONFIRMED
\[-\]
\[\Gamma\vdash_{AL} O\]
Dis. Syll(1,2)
\[\neg(\neg E\wedge E)\]
\[\Gamma\vdash E\]
Scan
\[-\]
\[\Gamma\vdash_{KL} \neg E\wedge E\]
And (2,4)
\[-\]
DEFEATED (5)
\[-\]
\[-\]
5
\[\Gamma\vdash_{KL} E\vee O\]
OR (4)
New Code
...
let classify_passport (
scan : scan_result ) :
passport_status =
match scan with
| Checked(checksum) -> just EReadable
| Failed -> print "If you passport is new than 2020"
print "clean scanner and retry;"
print "else go to manual line."
rescan( scan )
let rescan( previous : scan_result ) :
passport_status =
match new_scan() with
| Checked(checksum) -> EReadable
| Failed -> IssuedBefore2020New event:
as you leave the officer does the same for another traveller, but this time the scan is still false, and the passport is after 2020!
5. Revisit the table at 4, and derive its consequences in KL
"Tri"-analize in Adaptive Logic (AP):
Use KL as long as no abnormalities. \(\Gamma\)
Then switch to LP to fix abnormalities and continue in KL.
#
1
2
3
4
5
Claim
\[\Gamma\vdash E\vee O\]
Reason
Default
Condition
Feasible?
\[\Gamma\vdash \neg E\]
Scan
\[\emptyset\]
\[\emptyset\]
DEFEATED (5)
\[-\]
\[\Gamma\vdash_{AL} O\]
Dis. Syll(1,2)
\[\neg(\neg E\wedge E)\]
\[\Gamma\vdash \neg E\wedge \neg O\]
Scan
\[-\]
\[\Gamma\vdash_{KL} \neg (E\vee O)\]
De Morgan (4)
\[-\]
\[-\]
\[-\]
6
\(\Gamma\vdash\) No Entry
Defeated law
\[-\]
\[-\]
\[-\]

List your defaults; then order them
-
D1: One negative scan denies entry
-
D2: One clean scan allows entry
-
D3: Agent can allow/deny entry after inspection.
-
If D2>D1 then rescan may allow entry.
-
If D1>D2 then rescan might not allow entry, requires agent.
You should articulate your defaults and their order with your client. After that the software can take over and guide the defaults according to the rules, possibly defeating earlier logical deductions.
Adaptive Logic
By James Wilson
Adaptive Logic
Inductive reasoning assumes defaults, by listing the defaults and their order we can defeat reasoning that becomes faulty after event occur. It is a strategy to be have rationally in an irrational world.
- 12