language derivations: add hypotheses, L example
This commit is contained in:
parent
8a85dcfc8f
commit
aeb441e06d
2 changed files with 15 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
module Logic.Language.Impl.L where
|
||||
|
||||
import Logic.Language (Language(..))
|
||||
import Logic.Language.Derivation (Derivation(..))
|
||||
import Logic.Statement (Statement(..))
|
||||
import Logic.Parse
|
||||
( Parser(..)
|
||||
|
@ -141,3 +142,12 @@ serializeL (Implies s1 s2) = do
|
|||
l1 <- serializeL s1
|
||||
l2 <- serializeL s2
|
||||
return $ [Open] ++ l1 ++ [Arrow] ++ l2 ++ [Close]
|
||||
|
||||
deriveLExample1 :: Derivation AlphaL
|
||||
deriveLExample1 = step5
|
||||
where
|
||||
step1 = Hypothesis [Open, Variable 1, Arrow, Variable 2, Close]
|
||||
step2 = Axiom2 0 [Open, Variable 1, Arrow, Variable 2, Close] [Variable 0]
|
||||
step3 = Infer2 0 0 step2 step1
|
||||
step4 = Axiom3 0 [Variable 0] [Variable 1] [Variable 2]
|
||||
step5 = Infer2 0 0 step4 step3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue