========================================
Running: chap1.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:10 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/chap1.cafe
--> ****************************************************************
--> 1 まずはじめよう!
--> ****************************************************************
--> ****************************************************************
--> 1.1 既にある関数を使う
--> ****************************************************************
-- reading in file : nat
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/nat.cafe
-- defining module! NAT
-- reading in file : nznat
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/nznat.cafe
-- defining module! NZNAT
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
-- done reading in file: nznat
-- done reading in file: nat
-- reduce in NAT : (3 + 4):NzNat
(7):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
-- reduce in NAT : (12345 + 67890):NzNat
(80235):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
-- reduce in NAT : (98765 + 43210):NzNat
(141975):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
--> ****************************************************************
--> ****************************************************************
-- reduce in NAT : ((890 * 22) + ((890 * 25) + (890 * 28))):NzNat
(66750):NzNat
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 5 matches)
-- reduce in NAT : ((890 * 22) + ((890 + 60) * 6)):NzNat
(25280):NzNat
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 4 matches)
--> ****************************************************************
--> 1.2.1 CafeOBJの式とソート
--> ****************************************************************
--> ****************************************************************
--> 練習問題1.1の解答
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 練習問題1.2の解答
--> ****************************************************************
-- opening module NAT
-- reduce in %NAT : ((2* 3) + (2 !)):Nat
(8):NzNat
(0.0000 sec for parse, 0.0000 sec for 9 rewrites + 12 matches)
--> 8
-- reduce in %NAT : (2* (3 !)):Nat
(12):NzNat
(0.0000 sec for parse, 0.0000 sec for 11 rewrites + 16 matches)
--> 12
-- reduce in %NAT : ((2* 3) !):Nat
(720):NzNat
(0.0000 sec for parse, 0.0000 sec for 20 rewrites + 31 matches)
--> 720
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 1.2.2 演算記号の優先順位と左右結合
--> ****************************************************************
sys:mod! NAT
principal-sort Nat
{
imports {
protecting (NZNAT)
protecting (NAT-VALUE)
}
signature {
op s _ : Nat -> NzNat { prec: 15 }
pred _ >= _ : Nat Nat { prec: 51 }
pred _ > _ : Nat Nat { prec: 51 }
pred _ <= _ : Nat Nat { prec: 51 }
pred _ < _ : Nat Nat { prec: 51 }
op _ * _ : Nat Nat -> Nat { assoc comm idr: 1 prec: 31 r-assoc }
op _ + _ : Nat Nat -> Nat { assoc comm idr: 0 prec: 33 r-assoc }
op sd : Nat Nat -> Nat { comm prec: 0 }
op _ quo _ : Nat NzNat -> Nat { prec: 31 }
op _ rem _ : Nat NzNat -> Nat { prec: 31 l-assoc }
pred _ divides _ : NzNat Nat { prec: 51 }
op p _ : NzNat -> Nat { prec: 15 }
}
axioms {
var M : Nat
var N : Nat
var NN : NzNat
eq sd(M,N) = #! (ABS (- M N)) .
eq (M + N) = #! (+ M N) .
eq (M * N) = #! (* M N) .
eq (M quo NN) = #! (TRUNCATE M NN) .
eq (M rem NN) = #! (REM M NN) .
eq (NN divides M) = #! (= 0 (REM M NN)) .
eq (N < 0) = false .
eq (0 < NN) = true .
eq (NN <= 0) = false .
eq (0 <= N) = true .
eq (0 > N) = false .
eq (NN > 0) = true .
eq (0 >= NN) = false .
eq (N >= 0) = true .
eq (s 0) = 1 .
eq (p NN) = #! (- NN 1) .
eq [ident0]: (0 + X-ID:Nat) = X-ID .
eq [ident1]: (1 * X-ID:Nat) = X-ID .
}
}
sys:mod! NZNAT
principal-sort NzNat
{
imports {
protecting (NZNAT-VALUE)
protecting (BOOL)
}
signature {
op _ + _ : NzNat NzNat -> NzNat { assoc comm prec: 33 r-assoc }
op d : NzNat NzNat -> NzNat { comm prec: 0 }
op _ * _ : NzNat NzNat -> NzNat { assoc comm idr: 1 prec: 31 r-assoc }
op _ quot _ : NzNat NzNat -> NzNat { prec: 31 l-assoc }
pred _ < _ : NzNat NzNat { prec: 51 }
pred _ <= _ : NzNat NzNat { prec: 51 }
pred _ > _ : NzNat NzNat { prec: 51 }
pred _ >= _ : NzNat NzNat { prec: 51 }
op s _ : NzNat -> NzNat { prec: 15 }
}
axioms {
var NN : NzNat
var NM : NzNat
eq (NN + NM) = #! (+ NN NM) .
eq d(NN,NM) = #! (IF (= NN NM)
1
(ABS (- NN NM))) .
eq (NN * NM) = #! (* NN NM) .
eq (NN quot NM) = #! (IF (> NN NM)
(TRUNCATE NN NM)
1) .
eq (NN < NM) = #! (< NN NM) .
eq (NN <= NM) = #! (<= NN NM) .
eq (NN > NM) = #! (> NN NM) .
eq (NN >= NM) = #! (>= NN NM) .
eq (s NN) = #! (1+ NN) .
eq [ident0]: (1 * X-ID:NzNat) = X-ID .
}
}
(3 + (4 * 5)):NzNat
(3 + (4 + 5)):NzNat
(3 * (4 * 5)):NzNat
-- opening module NAT
[Warning]: Ambiguous term:
please try `check regularity' command.
if the signature is regular, there possibly be
some name conflicts between operators and variables.
[1] _b_ : Nat Nat -> Nat ------------------------((3 a 4) b 5)
[2] _a_ : Nat Nat -> Nat ------------------------(3 a (4 b 5))
[Error]: no successful parse
("ambiguous term"):SyntaxErr
[Warning]: Ambiguous term:
please try `check regularity' command.
if the signature is regular, there possibly be
some name conflicts between operators and variables.
[1] _a_ : Nat Nat -> Nat ------------------------(3 a (4 a 5))
[2] _a_ : Nat Nat -> Nat ------------------------((3 a 4) a 5)
[Error]: no successful parse
("ambiguous term"):SyntaxErr
(3 c (4 d 5)):Nat
((3 c 4) c 5):Nat
(3 d (4 d 5)):Nat
--> ****************************************************************
--> 練習問題1.3の解答
--> ****************************************************************
-- opening module NAT
................................(_ + _)................................
* rank: NzNat NzNat -> NzNat
- attributes: { assoc comm prec: 33 r-assoc }
- axioms:
eq (NN + NM:NzNat) = #! (+ NN NM)
eq (M + N) = #! (+ M N)
* rank: Nat Nat -> Nat
- attributes: { assoc comm idr: 0 prec: 33 r-assoc }
- axioms:
eq (M + N) = #! (+ M N)
eq [ident0]: (0 + X-ID:Nat) = X-ID
................................(2* _)................................
* rank: Nat -> Nat
- attributes: { strat: (0 1) prec: 30 }
- axioms:
eq (2* N) = (N + N)
.................................(_ !).................................
* rank: Nat -> Nat
- attributes: { prec: 20 }
- axioms:
eq (0 !) = 1
eq (N:NzNat !) = (N * ((p N) !))
-- reduce in %NAT : (2* (3 !)):Nat
(12):NzNat
(0.0000 sec for parse, 0.0000 sec for 11 rewrites + 16 matches)
--> 12
-- reduce in %NAT : (2* (2* (3 !))):Nat
(24):NzNat
(0.0000 sec for parse, 0.0000 sec for 13 rewrites + 18 matches)
--> 24
-- reduce in %NAT : ((2* (3 !)) + (2* (2* (3 !)))):Nat
(36):NzNat
(0.0000 sec for parse, 0.0000 sec for 25 rewrites + 35 matches)
--> 36
-- reduce in %NAT : (2* ((3 !) !)):Nat
(1440):NzNat
(0.0000 sec for parse, 0.0000 sec for 29 rewrites + 45 matches)
--> 1440
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 1.3 式に名前をつける
--> ****************************************************************
-- opening module NAT
-- reduce in %NAT : ((22 * hPay) + ((25 * hPay) + (28 * hPay))):Nat
(66750):NzNat
(0.0000 sec for parse, 0.0000 sec for 8 rewrites + 11 matches)
-- opening module NAT
-- reduce in %NAT : ((22 * hPay) + ((25 * hPay) + (28 * hPay))):Nat
(68250):NzNat
(0.0000 sec for parse, 0.0000 sec for 8 rewrites + 11 matches)
-- opening module NAT
-- reduce in %NAT : (wpSum):Nat
(66750):NzNat
(0.0000 sec for parse, 0.0000 sec for 12 rewrites + 15 matches)
--> ****************************************************************
--> 練習問題1.4の解答
--> ****************************************************************
-- opening module NAT
-- reduce in %NAT : (wPay):Nat
(25280):NzNat
(0.0000 sec for parse, 0.0000 sec for 10 rewrites + 12 matches)
-- reduce in %NAT : (wPay = ((890 * 22) + ((890 + 60) * 6))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 15 rewrites + 17 matches)
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 1.4 演算を定義する
--> ****************************************************************
-- opening module NAT
-- reduce in %NAT : (wpSum(22,25,28)):Nat
(66750):NzNat
(0.0000 sec for parse, 0.0000 sec for 9 rewrites + 12 matches)
-- reduce in %NAT : (wpSum(20,24,28)):Nat
(64080):NzNat
(0.0000 sec for parse, 0.0000 sec for 9 rewrites + 12 matches)
--> ****************************************************************
--> 練習問題1.5の解答
--> ****************************************************************
-- opening module NAT
-- reduce in %NAT : (wpSum2(890,22,25,28)):Nat
(66750):NzNat
(0.0000 sec for parse, 0.0000 sec for 6 rewrites + 6 matches)
-- reduce in %NAT : (wpSum2(950,22,25,28)):Nat
(71250):NzNat
(0.0000 sec for parse, 0.0000 sec for 6 rewrites + 6 matches)
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 1.4.1 簡約のトレース
--> ****************************************************************
-- opening module NAT
-- reduce in %NAT : (wpSum(22,25,28)):Nat
[1]: (wpSum(22,25,28)):Nat
---> ((hPay * 22) + ((hPay * 25) + (hPay * 28))):Nat
[2]: ((hPay * 22) + ((hPay * 25) + (hPay * 28))):Nat
---> ((890 * 22) + ((hPay * 25) + (hPay * 28))):Nat
[3]: ((890 * 22) + ((hPay * 25) + (hPay * 28))):Nat
---> (19580 + ((hPay * 25) + (hPay * 28))):Nat
[4]: (19580 + ((hPay * 25) + (hPay * 28))):Nat
---> (19580 + ((890 * 25) + (hPay * 28))):Nat
[5]: (19580 + ((890 * 25) + (hPay * 28))):Nat
---> (19580 + (22250 + (hPay * 28))):Nat
[6]: (19580 + (22250 + (hPay * 28))):Nat
---> (19580 + (22250 + (890 * 28))):Nat
[7]: (19580 + (22250 + (890 * 28))):Nat
---> (19580 + (22250 + 24920)):Nat
[8]: (19580 + (22250 + 24920)):Nat
---> (19580 + 47170):Nat
[9]: (19580 + 47170):Nat
---> (66750):Nat
(66750):NzNat
(0.0000 sec for parse, 0.0000 sec for 9 rewrites + 12 matches)
-- reduce in %NAT : (wpSum(20,24,28)):Nat
(64080):NzNat
(0.0000 sec for parse, 0.0000 sec for 9 rewrites + 12 matches)
--> ****************************************************************
--> 1.5 データ構造を定義する
--> ****************************************************************
-- opening module NAT
-- reduce in %NAT : (wpSum(890,(22 (25 (28 #)))) = ((890 * 22) + ((890 * 25) + (890 * 28)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 16 rewrites + 19 matches)
-- reduce in %NAT : (wpSum(910,(22 (25 (28 #)))) = ((910 * 22) + ((910 * 25) + (910 * 28)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 16 rewrites + 19 matches)
-- reduce in %NAT : (wpSum(910,(22 (25 (28 (31 #))))) = ((910 * 22) + ((910 * 25) + ((910 * 28) + (910 * 31))))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 21 rewrites + 25 matches)
--> ****************************************************************
--> 1.5.1 記号テストと証明スコア
--> ****************************************************************
-- opening module NAT
-- reduce in %NAT : (wpSum(hp,(wwh1 (wwh2 (wwh3 #)))) = ((hp * wwh1) + ((hp * wwh2) + (hp * wwh3)))):Bool
(true):Bool
(0.0001 sec for parse, 0.0001 sec for 6 rewrites + 86 matches)
--> ****************************************************************
--> 1.6 さらにデータ構造を定義する
--> ****************************************************************
-- opening module NAT
-- reduce in %NAT : (890 , 22):HpayWwHoursPair
(890 , 22):HpayWwHoursPair
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 0 matches)
-- reduce in %NAT : (910 , 25):HpayWwHoursPair
(910 , 25):HpayWwHoursPair
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 0 matches)
-- reduce in %NAT : (#):HpayWwHoursPairList
(#):HpayWwHoursPairList
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 0 matches)
-- reduce in %NAT : ((890 , 22) ((910 , 25) ((860 , 28) #))):HpayWwHoursPairList
((890 , 22) ((910 , 25) ((860 , 28) #))):HpayWwHoursPairList
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 0 matches)
-- reduce in %NAT : (wpSum(#) = 0):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 2 matches)
-- reduce in %NAT : (wpSum(((890 , 22) ((910 , 25) ((860 , 28) #)))) = ((890 * 22) + ((910 * 25) + (860 * 28)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 16 rewrites + 19 matches)
--> ****************************************************************
--> 1.6.1 条件を判定する
--> ****************************************************************
-- opening module NAT
-- reduce in %NAT : (wpSumWap(((890 , 22) ((910 , 25) ((860 , 28) #))))):Nat
(66710):NzNat
(0.0000 sec for parse, 0.0000 sec for 25 rewrites + 31 matches)
-- reduce in %NAT : (wpSumWap(((890 , 22) ((910 , 25) ((860 , 28) #)))) = (((860 * 28) + ((890 * 22) + (910 * 25))) + ((60 * sd(25,24)) + (60 * sd(28,24))))):Bool
(true):Bool
(0.0001 sec for parse, 0.0000 sec for 37 rewrites + 45 matches)
-- opening module NAT
-- reduce in %NAT : (wpSumWap(((890 , 22) ((910 , 25) ((860 , 28) #)))) = (((860 * 28) + ((890 * 22) + (910 * 25))) + ((60 * sd(25,24)) + (60 * sd(28,24))))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 37 rewrites + 48 matches)
-- reduce in %NAT : (wpSumWap(((890 , 22) ((910 , 25) ((860 , 28) #))))):Nat
[1]: (wpSumWap(((890 , 22) ((910 , 25) ((860 , 28) #))))):Nat
---> (wPayWap((890 , 22)) + wpSumWap(((910 , 25) ((860 , 28) #)))):Nat
[2(cond)]: (22 > 24):Bool
--> (false):Bool
[3(cond)]: (not (22 > 24)):Bool
--> ((22 > 24) xor true):Bool
[4(cond)]: ((22 > 24) xor true):Bool
--> (false xor true):Bool
[5(cond)]: (false xor true):Bool
--> (true):Bool
[6]: (wPayWap((890 , 22)) + wpSumWap(((910 , 25) ((860 , 28) #)))):Nat
---> ((890 * 22) + wpSumWap(((910 , 25) ((860 , 28) #)))):Nat
[7]: ((890 * 22) + wpSumWap(((910 , 25) ((860 , 28) #)))):Nat
---> (19580 + wpSumWap(((910 , 25) ((860 , 28) #)))):Nat
[8]: (19580 + wpSumWap(((910 , 25) ((860 , 28) #)))):Nat
---> (19580 + (wPayWap((910 , 25)) + wpSumWap(((860 , 28) #)))):Nat
[9(cond)]: (25 > 24):Bool
--> (true):Bool
[10]: (19580 + (wPayWap((910 , 25)) + wpSumWap(((860 , 28) #)))):Nat
---> (19580 + (((910 * 25) + (60 * sd(25,24))) + wpSumWap(((860 , 28) #)))):Nat
[11]: (19580 + (((910 * 25) + (60 * sd(25,24))) + wpSumWap(((860 , 28) #)))):Nat
---> (19580 + ((22750 + (60 * sd(25,24))) + wpSumWap(((860 , 28) #)))):Nat
[12]: (19580 + ((22750 + (60 * sd(25,24))) + wpSumWap(((860 , 28) #)))):Nat
---> (19580 + ((22750 + (60 * 1)) + wpSumWap(((860 , 28) #)))):Nat
[13]: (19580 + ((22750 + (60 * 1)) + wpSumWap(((860 , 28) #)))):Nat
---> (19580 + ((22750 + 60) + wpSumWap(((860 , 28) #)))):Nat
[14]: (19580 + ((22750 + 60) + wpSumWap(((860 , 28) #)))):Nat
---> (19580 + (22810 + wpSumWap(((860 , 28) #)))):Nat
[15]: (19580 + (22810 + wpSumWap(((860 , 28) #)))):Nat
---> (19580 + (22810 + (wPayWap((860 , 28)) + wpSumWap(#)))):Nat
[16(cond)]: (28 > 24):Bool
--> (true):Bool
[17]: (19580 + (22810 + (wPayWap((860 , 28)) + wpSumWap(#)))):Nat
---> (19580 + (22810 + (((860 * 28) + (60 * sd(28,24))) + wpSumWap(#)))):Nat
[18]: (19580 + (22810 + (((860 * 28) + (60 * sd(28,24))) + wpSumWap(#)))):Nat
---> (19580 + (22810 + ((24080 + (60 * sd(28,24))) + wpSumWap(#)))):Nat
[19]: (19580 + (22810 + ((24080 + (60 * sd(28,24))) + wpSumWap(#)))):Nat
---> (19580 + (22810 + ((24080 + (60 * 4)) + wpSumWap(#)))):Nat
[20]: (19580 + (22810 + ((24080 + (60 * 4)) + wpSumWap(#)))):Nat
---> (19580 + (22810 + ((24080 + 240) + wpSumWap(#)))):Nat
[21]: (19580 + (22810 + ((24080 + 240) + wpSumWap(#)))):Nat
---> (19580 + (22810 + (24320 + wpSumWap(#)))):Nat
[22]: (19580 + (22810 + (24320 + wpSumWap(#)))):Nat
---> (19580 + (22810 + (24320 + 0))):Nat
[23]: (19580 + (22810 + (24320 + 0))):Nat
---> (19580 + (22810 + 24320)):Nat
[24]: (19580 + (22810 + 24320)):Nat
---> (19580 + 47130):Nat
[25]: (19580 + 47130):Nat
---> (66710):Nat
(66710):NzNat
(0.0000 sec for parse, 0.0002 sec for 25 rewrites + 34 matches)
--> ****************************************************************
--> 1.6.2 簡約形の定義
--> ****************************************************************
-- opening module NAT
-- reduce in %NAT : ((n1 + n2) == (n2 + n1)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 11 matches)
-- reduce in %NAT : ((n1 + (n2 + n3)) == (n1 + (n2 + n3))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 33 matches)
-- reduce in %NAT : (((n1 * n2) + n3) == (n3 + (n2 * n1))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 23 matches)
-- reduce in %NAT : (((0 + (1 * n2)) + n1) == (n1 + n2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 20 matches)
-- reduce in %NAT : ((n1 * (n2 + n3)) == ((n1 * n2) + n3)):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 23 matches)
--> ****************************************************************
--> 1.7 モジュールを定義する
--> ****************************************************************
-- defining module WPsum
-- reduce in WPsum : (wpSum(((890 , 22) ((910 , 25) ((860 , 28) #))))):Nat
(66410):NzNat
(0.0000 sec for parse, 0.0000 sec for 10 rewrites + 13 matches)
-- opening module WPsum
-- reduce in %WPsum : (wpSum(((hp1 , wwh1) ((hp2 , wwh2) ((hp3 , wwh3) #)))) = ((hp1 * wwh1) + ((hp2 * wwh2) + (hp3 * wwh3)))):Bool
(true):Bool
(0.0001 sec for parse, 0.0001 sec for 6 rewrites + 86 matches)
--> ****************************************************************
--> 練習問題1.6の解答
--> ****************************************************************
-- defining module WPsumWap
-- reduce in WPsumWap : (wpSumWap(((890 , 22) ((910 , 25) ((860 , 28) #))))):Nat
(66710):NzNat
(0.0000 sec for parse, 0.0000 sec for 30 rewrites + 41 matches)
-- reduce in WPsumWap : (wpSumWap(((890 , 22) ((910 , 25) ((860 , 28) #)))) = (((860 * 28) + ((890 * 22) + (910 * 25))) + ((60 * sd(25,24)) + (60 * sd(28,24))))):Bool
(true):Bool
(0.0001 sec for parse, 0.0000 sec for 42 rewrites + 55 matches)
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 1.7.2 日本語の名前
--> ****************************************************************
-- defining module 週給計算
-- reduce in 週給計算 : (週給合計(((890 , 22) ((910 , 25) ((860 , 28) ■))))):Nat
(66410):NzNat
(0.0000 sec for parse, 0.0000 sec for 10 rewrites + 13 matches)
-- opening module 週給計算
-- reduce in %週給計算 : (週給合計(((時給1 , 週労働時間1) ((時給2 , 週労働時間2) ((時給3 , 週労働時間3) ■)))) = ((時給1 * 週労働時間1) + ((時給2 * 週労働時間2) + (時給3 * 週労働時間3)))):Bool
(true):Bool
(0.0001 sec for parse, 0.0001 sec for 6 rewrites + 86 matches)
--> ****************************************************************
--> 1.8 組込みモジュールBOOL
--> ****************************************************************
-- opening module BOOL
-- reduce in %BOOL : ((b1 iff b2) = (b2 iff b1)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 19 matches)
-- reduce in %BOOL : (((b1 iff b2) iff b3) = (b1 iff (b2 iff b3))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 9 rewrites + 63 matches)
-- reduce in %BOOL : (((b1 iff b2) and (b2 iff b3)) implies (b1 iff b3)):Bool
(true):Bool
(0.0000 sec for parse, 0.0010 sec for 57 rewrites + 1203 matches)
-- reduce in %BOOL : (((b1 implies b2) and (b2 implies b3)) implies (b1 implies b3)):Bool
(true):Bool
(0.0000 sec for parse, 0.0007 sec for 51 rewrites + 974 matches)
-- reduce in %BOOL : ((b1 implies (b2 implies b3)) = ((b1 and b2) implies b3)):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 9 rewrites + 170 matches)
--> ****************************************************************
--> 1.8.1 ブール式の関数等価性,恒真性,充足可能性
--> ****************************************************************
-- opening module BOOL
-- reduce in %BOOL : (b1 iff b1):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 10 matches)
-- reduce in %BOOL : ((b1 iff b2) = (not (b1 xor b2))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 19 matches)
-- reduce in %BOOL : (((b1 iff b2) iff b3) = (b1 iff (b2 iff b3))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 9 rewrites + 63 matches)
-- reduce in %BOOL : ((b1 iff b2) = (b2 iff b1)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 19 matches)
-- reduce in %BOOL : ((b1 iff b2) = ((b1 implies b2) and (b2 implies b1))):Bool
(true):Bool
(0.0000 sec for parse, 0.0002 sec for 22 rewrites + 298 matches)
-- reduce in %BOOL : (((b1 iff b2) and (b2 iff b3)) implies (b1 iff b3)):Bool
(true):Bool
(0.0000 sec for parse, 0.0009 sec for 57 rewrites + 1203 matches)
-- reduce in %BOOL : (((b1 implies b2) and (b2 implies b3)) implies (b1 implies b3)):Bool
(true):Bool
(0.0000 sec for parse, 0.0006 sec for 51 rewrites + 974 matches)
-- reduce in %BOOL : ((b1 implies (b2 implies b3)) = ((b1 and b2) implies b3)):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 9 rewrites + 170 matches)
-- reduce in %BOOL : ((not (b1 and b2)) = ((not b1) or (not b2))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 13 rewrites + 125 matches)
-- reduce in %BOOL : ((not (b1 or b2)) = ((not b1) and (not b2))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 9 rewrites + 83 matches)
-- reduce in %BOOL : (((b1 or b2) and b3) = ((b1 and b3) or (b2 and b3))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 6 rewrites + 151 matches)
-- reduce in %BOOL : (((b1 and b2) or b3) = ((b1 or b3) and (b2 or b3))):Bool
(true):Bool
(0.0000 sec for parse, 0.0003 sec for 22 rewrites + 448 matches)
-- reduce in %BOOL : (((b1 and b2) iff b1) = (b1 implies b2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 35 matches)
--> ****************************************************************
NAT> [Leaving CafeOBJ]
========================================
Running: chap2.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:10 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/chap2.cafe
--> ****************************************************************
--> 2 ペアノ自然数と証明スコア法
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 2.1 ペアの自然数のCafeOBJ仕様
--> ****************************************************************
--> -----------------------------------------------------------------
--> PNAT: Peano NATural numbers
--> -----------------------------------------------------------------
-- defining module! PNAT
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
-- reduce in PNAT : (0):Nat
(0):Nat
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 0 matches)
-- reduce in PNAT : (s (s (s 0))):Nat
(s (s (s 0))):Nat
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 0 matches)
--> ****************************************************************
--> 2.2 ペアノ自然数の等価性判定
--> ****************************************************************
--> ----------------------------------------------------------------
--> PNAT with equality _=_
--> ----------------------------------------------------------------
-- defining module! PNAT=
--> testing PNAT=
-- reduce in PNAT= : ((s (s 0)) = (s (s 0))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 7 matches)
-- reduce in PNAT= : ((s 0) = (s (s (s 0)))):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 3 matches)
-- reduce in PNAT= : ((s (s (s 0))) = (s 0)):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 3 matches)
--> ****************************************************************
--> 練習問題2.1 未使用定数を含むペアノ自然数の等価性の解答例
--> (「2.6.1 未使用定数を含む式の簡約」も参照せよ)
--> ****************************************************************
-- opening module PNAT=
-- reduce in %PNAT= : ((s c) = c):Bool
((s c) = c):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 3 matches)
-- opening module PNAT=
-- reduce in %PNAT= : ((s c) = c):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 7 matches)
--> false
-- reduce in %PNAT= : ((s (s c)) = c):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 6 rewrites + 17 matches)
--> false
-- reduce in %PNAT= : ((s (s (s c))) = c):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 8 rewrites + 27 matches)
--> false
-- reduce in %PNAT= : ((s (s (s c))) = (s (s (s (s (s (s (s c)))))))):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 16 rewrites + 61 matches)
--> false
-- reduce in %PNAT= : ((s (s (s (s (s (s (s c))))))) = (s (s (s (s (s c)))))):Bool
(false):Bool
(0.0000 sec for parse, 0.0001 sec for 16 rewrites + 57 matches)
--> false
-- reduce in %PNAT= : ((s c) = 0):Bool
((0 =< (s c)) and ((s c) =< 0)):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 35 matches)
-- reduce in %PNAT= : ((s (s 0)) = (s c)):Bool
((c =< (s 0)) and ((s 0) =< c)):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 43 matches)
-- reduce in %PNAT= : ((s d) = d):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 7 matches)
--> false
-- reduce in %PNAT= : ((s (s d)) = d):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 6 rewrites + 17 matches)
--> false
-- reduce in %PNAT= : ((s (s (s d))) = d):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 8 rewrites + 27 matches)
--> false
-- reduce in %PNAT= : ((s (s (s d))) = (s (s (s (s (s (s (s d)))))))):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 16 rewrites + 61 matches)
--> false
-- reduce in %PNAT= : ((s (s (s (s (s (s (s d))))))) = (s (s (s (s (s d)))))):Bool
(false):Bool
(0.0000 sec for parse, 0.0001 sec for 16 rewrites + 57 matches)
--> false
-- reduce in %PNAT= : ((s d) = 0):Bool
((0 =< (s d)) and ((s d) =< 0)):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 35 matches)
-- reduce in %PNAT= : ((s (s 0)) = (s d)):Bool
((d =< (s 0)) and ((s 0) =< d)):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 43 matches)
-- reduce in %PNAT= : ((s d) = c):Bool
((c =< (s d)) and ((s d) =< c)):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 35 matches)
-- reduce in %PNAT= : ((s (s c)) = (s d)):Bool
((d =< (s c)) and ((s c) =< d)):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 43 matches)
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 2.3 ペアノ自然数の加算
--> ****************************************************************
--> ----------------------------------------------------------------
--> PNAT with the addition _+_
--> ----------------------------------------------------------------
-- defining module! PNAT+
-- reduce in PNAT+ : ((s (s 0)) + ((s (s (s 0))) + (s (s (s (s 0)))))):Nat
(s (s (s (s (s (s (s (s (s 0))))))))):Nat
(0.0000 sec for parse, 0.0000 sec for 7 rewrites + 12 matches)
-- reduce in PNAT+ : (((s (s 0)) + ((s (s (s 0))) + (s (s (s (s 0)))))) = (s (s (s (s (s (s (s (s (s 0)))))))))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 17 rewrites + 33 matches)
--> ****************************************************************
--> 2.4 加算の右0の証明
--> ****************************************************************
--> ================================================================
--> 演算_+_が右0を満たすこと,すなわち等式
--> eq X:Nat + 0 = X .
--> が成り立つことを,X:Natに関する帰納法で証明する証明スコア
--> ----------------------------------------------------------------
--> induction base
-- reduce in PNAT+ : ((0 + 0) = 0):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 4 matches)
--> induction step
-- opening module PNAT+
-- reduce in %PNAT+ : (((s n) + 0) = (s n)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 9 matches)
--> QED
--> ================================================================
-- opening module PNAT+
-- reduce in %PNAT+ : (((s n) + 0) = (s n)):Bool
[1]: (((s n) + 0) = (s n)):Bool
---> ((s (n + 0)) = (s n)):Bool
[2]: ((s (n + 0)) = (s n)):Bool
---> ((s n) = (s n)):Bool
[3]: ((s n) = (s n)):Bool
---> (n = n):Bool
[4]: (n = n):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 9 matches)
--> ****************************************************************
--> 2.5 加算の右s_の証明
--> ****************************************************************
--> ================================================================
--> proof score for proving right s_ of _+_:
--> eq X:Nat + s Y:Nat = s (X + Y) .
--> with the induction on X:Nat
--> ----------------------------------------------------------------
--> induction base
-- opening module PNAT+
-- reduce in %PNAT+ : ((0 + (s y)) = (s (0 + y))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 7 matches)
--> induction step
-- opening module PNAT+
-- reduce in %PNAT+ : (((s n) + (s y)) = (s ((s n) + y))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 6 rewrites + 32 matches)
--> ================================================================
--> induction base
-- opening module PNAT+
-- reduce in %PNAT+ : ((0 + (s y)) = (s (0 + y))):Bool
[1]: ((0 + (s y)) = (s (0 + y))):Bool
---> ((s y) = (s (0 + y))):Bool
[2]: ((s y) = (s (0 + y))):Bool
---> ((s y) = (s y)):Bool
[3]: ((s y) = (s y)):Bool
---> (y = y):Bool
[4]: (y = y):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 7 matches)
-- opening module PNAT+
-- reduce in %PNAT+ : (((s n) + (s y)) = (s ((s n) + y))):Bool
1>[1] rule: eq ((s X:Nat) + Y:Nat) = (s (X + Y))
{ X:Nat |-> n, Y:Nat |-> (s y) }
1<[1] ((s n) + (s y)):Nat --> (s (n + (s y))):Nat
[1]: (((s n) + (s y)) = (s ((s n) + y))):Bool
---> ((s (n + (s y))) = (s ((s n) + y))):Bool
1>[2] rule: eq (n + (s Y:Nat)) = (s (n + Y))
{ Y:Nat |-> y }
1<[2] (n + (s y)):Nat --> (s (n + y)):Nat
[2]: ((s (n + (s y))) = (s ((s n) + y))):Bool
---> ((s (s (n + y))) = (s ((s n) + y))):Bool
1>[3] rule: eq ((s X:Nat) + Y:Nat) = (s (X + Y))
{ X:Nat |-> n, Y:Nat |-> y }
1<[3] ((s n) + y):Nat --> (s (n + y)):Nat
[3]: ((s (s (n + y))) = (s ((s n) + y))):Bool
---> ((s (s (n + y))) = (s (s (n + y)))):Bool
1>[4] rule: eq ((s X:Nat) = (s Y:Nat)) = (X = Y)
{ Y:Nat |-> (s (n + y)), X:Nat |-> (s (n + y)) }
1<[4] ((s (s (n + y))) = (s (s (n + y)))):Bool --> ((s (n + y)) = (s (n + y))):Bool
[4]: ((s (s (n + y))) = (s (s (n + y)))):Bool
---> ((s (n + y)) = (s (n + y))):Bool
1>[5] rule: eq ((s X:Nat) = (s Y:Nat)) = (X = Y)
{ Y:Nat |-> (n + y), X:Nat |-> (n + y) }
1<[5] ((s (n + y)) = (s (n + y))):Bool --> ((n + y) = (n + y)):Bool
[5]: ((s (n + y)) = (s (n + y))):Bool
---> ((n + y) = (n + y)):Bool
1>[6] rule: eq (CUX:*Cosmos* = CUX) = true
{ CUX:*Cosmos* |-> (n + y) }
1<[6] ((n + y) = (n + y)):Bool --> (true):Bool
[6]: ((n + y) = (n + y)):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 6 rewrites + 32 matches)
--> ****************************************************************
--> 練習問題2.2 トレース1の解答例
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 2.6 加算の可換則の証明
--> ****************************************************************
--> ================================================================
--> proof score for proving commutativity of _+_:
--> eq (X:Nat + Y:Nat) = (Y + X) .
--> with the induction on X:Nat
--> ----------------------------------------------------------------
--> induction base
-- opening module PNAT+
-- reduce in %PNAT+ : ((0 + y) = (y + 0)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 6 matches)
--> induction step
-- opening module PNAT+
-- reduce in %PNAT+ : (((s n) + y) = (y + (s n))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 28 matches)
--> QED
--> ================================================================
--> induction base
-- opening module PNAT+
-- reduce in %PNAT+ : ((0 + y) = (y + 0)):Bool
[1]: ((0 + y) = (y + 0)):Bool
---> (y = (y + 0)):Bool
[2]: (y = (y + 0)):Bool
---> (y = y):Bool
[3]: (y = y):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 6 matches)
--> induction step
-- opening module PNAT+
-- reduce in %PNAT+ : (((s n) + y) = (y + (s n))):Bool
[1]: (((s n) + y) = (y + (s n))):Bool
---> ((s (n + y)) = (y + (s n))):Bool
[2]: ((s (n + y)) = (y + (s n))):Bool
---> ((s (y + n)) = (y + (s n))):Bool
[3]: ((s (y + n)) = (y + (s n))):Bool
---> ((s (y + n)) = (s (y + n))):Bool
[4]: ((s (y + n)) = (s (y + n))):Bool
---> ((y + n) = (y + n)):Bool
[5]: ((y + n) = (y + n)):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 28 matches)
--> ****************************************************************
--> 練習問題2.3 トレース2の解答例
--> ****************************************************************
--> induction base
-- opening module PNAT+
-- reduce in %PNAT+ : ((0 + y) = (y + 0)):Bool
1>[1] rule: eq (0 + Y:Nat) = Y
{ Y:Nat |-> y }
1<[1] (0 + y):Nat --> (y):Nat
[1]: ((0 + y) = (y + 0)):Bool
---> (y = (y + 0)):Bool
1>[2] rule: eq (X:Nat + 0) = X
{ X:Nat |-> y }
1<[2] (y + 0):Nat --> (y):Nat
[2]: (y = (y + 0)):Bool
---> (y = y):Bool
1>[3] rule: eq (CUX:*Cosmos* = CUX) = true
{ CUX:*Cosmos* |-> y }
1<[3] (y = y):Bool --> (true):Bool
[3]: (y = y):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 6 matches)
--> induction step
-- opening module PNAT+
-- reduce in %PNAT+ : (((s n) + y) = (y + (s n))):Bool
1>[1] rule: eq ((s X:Nat) + Y:Nat) = (s (X + Y))
{ X:Nat |-> n, Y:Nat |-> y }
1<[1] ((s n) + y):Nat --> (s (n + y)):Nat
[1]: (((s n) + y) = (y + (s n))):Bool
---> ((s (n + y)) = (y + (s n))):Bool
1>[2] rule: eq (n + Y:Nat) = (Y + n)
{ Y:Nat |-> y }
1<[2] (n + y):Nat --> (y + n):Nat
[2]: ((s (n + y)) = (y + (s n))):Bool
---> ((s (y + n)) = (y + (s n))):Bool
1>[3] rule: eq (X:Nat + (s Y:Nat)) = (s (X + Y))
{ X:Nat |-> y, Y:Nat |-> n }
1<[3] (y + (s n)):Nat --> (s (y + n)):Nat
[3]: ((s (y + n)) = (y + (s n))):Bool
---> ((s (y + n)) = (s (y + n))):Bool
1>[4] rule: eq ((s X:Nat) = (s Y:Nat)) = (X = Y)
{ Y:Nat |-> (y + n), X:Nat |-> (y + n) }
1<[4] ((s (y + n)) = (s (y + n))):Bool --> ((y + n) = (y + n)):Bool
[4]: ((s (y + n)) = (s (y + n))):Bool
---> ((y + n) = (y + n)):Bool
1>[5] rule: eq (CUX:*Cosmos* = CUX) = true
{ CUX:*Cosmos* |-> (y + n) }
1<[5] ((y + n) = (y + n)):Bool --> (true):Bool
[5]: ((y + n) = (y + n)):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 5 rewrites + 28 matches)
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 2.6.1 未使用定数を含む式の簡約
--> ****************************************************************
--> ----------------------------------------------------------------
--> PNAT= with a fresh constant c
--> ----------------------------------------------------------------
-- defining module PNAT=c
-- reduce in PNAT=c : ((s c) = (s c)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 5 matches)
-- reduce in PNAT=c : (c = (s c)):Bool
(c = (s c)):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 3 matches)
--> ----------------------------------------------------------------
--> PNAT with equal or less than _=<_
--> ----------------------------------------------------------------
-- defining module PNAT=<c
-- reduce in PNAT=<c : (c = (s c)):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 7 matches)
-- reduce in PNAT=<c : (c = (s (s (s (s c))))):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 10 rewrites + 37 matches)
-- reduce in PNAT=<c : ((s (s c)) = (s (s c))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 6 matches)
-- reduce in PNAT=<c : ((s (s (s c))) = (s (s (s (s (s c)))))):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 12 rewrites + 41 matches)
--> ****************************************************************
--> 2.7 加算の結合則の証明
--> ****************************************************************
--> ================================================================
--> proof score for proving associativity of _+_:
--> eq (X:Nat + Y:Nat) + Z:Nat = X + (Y + Z) .
--> with the induction on X:Nat
--> ----------------------------------------------------------------
--> induction base
-- opening module PNAT+
-- reduce in %PNAT+ : (((0 + y) + z) = (0 + (y + z))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 13 matches)
--> induction step
-- opening module PNAT+
-- reduce in %PNAT+ : ((((s n) + y) + z) = ((s n) + (y + z))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 6 rewrites + 75 matches)
--> QED
--> ================================================================
--> induction base
-- opening module PNAT+
-- reduce in %PNAT+ : (((0 + y) + z) = (0 + (y + z))):Bool
[1]: (((0 + y) + z) = (0 + (y + z))):Bool
---> ((y + z) = (0 + (y + z))):Bool
[2]: ((y + z) = (0 + (y + z))):Bool
---> ((y + z) = (y + z)):Bool
[3]: ((y + z) = (y + z)):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 13 matches)
--> induction step
-- opening module PNAT+
-- reduce in %PNAT+ : ((((s n) + y) + z) = ((s n) + (y + z))):Bool
[1]: ((((s n) + y) + z) = ((s n) + (y + z))):Bool
---> (((s (n + y)) + z) = ((s n) + (y + z))):Bool
[2]: (((s (n + y)) + z) = ((s n) + (y + z))):Bool
---> ((s ((n + y) + z)) = ((s n) + (y + z))):Bool
[3]: ((s ((n + y) + z)) = ((s n) + (y + z))):Bool
---> ((s (n + (y + z))) = ((s n) + (y + z))):Bool
[4]: ((s (n + (y + z))) = ((s n) + (y + z))):Bool
---> ((s (n + (y + z))) = (s (n + (y + z)))):Bool
[5]: ((s (n + (y + z))) = (s (n + (y + z)))):Bool
---> ((n + (y + z)) = (n + (y + z))):Bool
[6]: ((n + (y + z)) = (n + (y + z))):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 6 rewrites + 75 matches)
--> ****************************************************************
--> 2.8 ペアノ自然数の乗算
--> ****************************************************************
--> ----------------------------------------------------------------
--> PNAT with associative and commutative addition _+_
--> ----------------------------------------------------------------
-- defining module! PNAT+ac
................................(_ + _)................................
* rank: Nat Nat -> Nat
- attributes: { assoc comm prec: 41 r-assoc }
- axioms:
eq (0 + Y:Nat) = Y
eq ((s X:Nat) + Y:Nat) = (s (X + Y))
-- opening module PNAT+ac
-- reduce in %PNAT+ac : ((n1 + (n2 + n3)) = (n1 + (n2 + n3))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 19 matches)
--> true
-- reduce in %PNAT+ac : ((n1 + n2) = (n2 + n1)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 11 matches)
--> true
--> ----------------------------------------------------------------
--> PNAT with multiplication _*_
--> ----------------------------------------------------------------
-- defining module! PNAT*
-- reduce in PNAT* : (((s 0) * ((s (s 0)) * (s (s (s 0))))) + ((s (s 0)) + (s 0))):Nat
(s (s (s (s (s (s (s (s (s 0))))))))):Nat
(0.0000 sec for parse, 0.0001 sec for 21 rewrites + 46 matches)
--> ****************************************************************
--> 2.9 乗算の右 0 と右 s_の証明
--> ****************************************************************
--> ================================================================
--> proof score for proving right 0 of _*_:
--> eq X:Nat * 0 = X .
--> with the induction on X:Nat
--> ----------------------------------------------------------------
--> induction base
-- reduce in PNAT* : ((0 * 0) = 0):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 4 matches)
--> induction step
-- opening module PNAT*
-- reduce in %PNAT* : (((s n) * 0) = 0):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 8 matches)
--> QED
--> ================================================================
--> induction base
-- reduce in PNAT* : ((0 * 0) = 0):Bool
[1]: ((0 * 0) = 0):Bool
---> (0 = 0):Bool
[2]: (0 = 0):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 4 matches)
--> induction step
-- opening module PNAT*
-- reduce in %PNAT* : (((s n) * 0) = 0):Bool
[1]: (((s n) * 0) = 0):Bool
---> ((0 + (n * 0)) = 0):Bool
[2]: ((0 + (n * 0)) = 0):Bool
---> ((0 + 0) = 0):Bool
[3]: ((0 + 0) = 0):Bool
---> (0 = 0):Bool
[4]: (0 = 0):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 8 matches)
--> ================================================================
--> induction base
-- opening module PNAT*
-- reduce in %PNAT* : ((0 * (s y)) = (0 + (0 * y))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 6 matches)
--> induction step
-- opening module PNAT*
-- reduce in %PNAT* : (((s n) * (s y)) = ((s n) + ((s n) * y))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 7 rewrites + 76 matches)
--> QED
--> ================================================================
--> induction base
-- opening module PNAT*
-- reduce in %PNAT* : ((0 * (s y)) = (0 + (0 * y))):Bool
[1]: ((0 * (s y)) = (0 + (0 * y))):Bool
---> (0 = (0 + (0 * y))):Bool
[2]: (0 = (0 + (0 * y))):Bool
---> (0 = (0 + 0)):Bool
[3]: (0 = (0 + 0)):Bool
---> (0 = 0):Bool
[4]: (0 = 0):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 6 matches)
--> induction step
-- opening module PNAT*
-- reduce in %PNAT* : (((s n) * (s y)) = ((s n) + ((s n) * y))):Bool
[1]: (((s n) * (s y)) = ((s n) + ((s n) * y))):Bool
---> (((s y) + (n * (s y))) = ((s n) + ((s n) * y))):Bool
[2]: (((s y) + (n * (s y))) = ((s n) + ((s n) * y))):Bool
---> (((s y) + (n + (n * y))) = ((s n) + ((s n) * y))):Bool
[3]: (((s y) + ((n * y) + n)) = ((s n) + ((s n) * y))):Bool
---> ((s (y + ((n * y) + n))) = ((s n) + ((s n) * y))):Bool
[4]: ((s ((n * y) + (n + y))) = ((s n) + ((s n) * y))):Bool
---> ((s ((n * y) + (n + y))) = ((s n) + (y + (n * y)))):Bool
[5]: ((s ((n * y) + (n + y))) = ((s n) + ((n * y) + y))):Bool
---> ((s ((n * y) + (n + y))) = (s (n + ((n * y) + y)))):Bool
[6]: ((s ((n * y) + (n + y))) = (s ((n * y) + (y + n)))):Bool
---> (((n * y) + (n + y)) = ((n * y) + (y + n))):Bool
[7]: ((n + (y + (n * y))) = (y + (n + (n * y)))):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 7 rewrites + 76 matches)
--> ****************************************************************
--> 2.10 乗算の可換則の証明
--> ****************************************************************
--> ================================================================
--> proof score for proving commutativity of _*_:
--> eq (X:Nat * Y:Nat) = (Y * X) .
--> with the induction on X:Nat
--> -----------------------------------------------------------------
--> induction base
-- opening module PNAT*
-- reduce in %PNAT* : ((0 * y) = (y * 0)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 6 matches)
--> induction step
-- opening module PNAT*
-- reduce in %PNAT* : (((s n) * y) = (y * (s n))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 26 matches)
--> QED
--> ================================================================
--> induction base
-- opening module PNAT*
-- reduce in %PNAT* : ((0 * y) = (y * 0)):Bool
[1]: ((0 * y) = (y * 0)):Bool
---> (0 = (y * 0)):Bool
[2]: (0 = (y * 0)):Bool
---> (0 = 0):Bool
[3]: (0 = 0):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 6 matches)
--> induction step
-- opening module PNAT*
-- reduce in %PNAT* : (((s n) * y) = (y * (s n))):Bool
[1]: (((s n) * y) = (y * (s n))):Bool
---> ((y + (n * y)) = (y * (s n))):Bool
[2]: ((y + (n * y)) = (y * (s n))):Bool
---> ((y + (y * n)) = (y * (s n))):Bool
[3]: (((y * n) + y) = (y * (s n))):Bool
---> (((y * n) + y) = (y + (y * n))):Bool
[4]: (((y * n) + y) = ((y * n) + y)):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 26 matches)
--> ****************************************************************
--> 練習問題 2.4
--> ****************************************************************
--> ================================================================
--> proof score for proving distributivity of _*_ over _+_
--> from right:
--> eq (X:Nat + Y:Nat) * Z:Nat = X * Z + Y * Z .
--> with the induction on X:Nat
--> ----------------------------------------------------------------
--> induction base
-- opening module PNAT*
-- reduce in %PNAT* : (((0 + y) * z) = ((0 * z) + (y * z))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 18 matches)
--> induction step
-- opening module PNAT*
-- reduce in %PNAT* : ((((s n) + y) * z) = (((s n) * z) + (y * z))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 61 matches)
--> QED
--> ================================================================
--> induction base
-- opening module PNAT*
-- reduce in %PNAT* : (((0 + y) * z) = ((0 * z) + (y * z))):Bool
[1]: (((0 + y) * z) = ((0 * z) + (y * z))):Bool
---> ((y * z) = ((0 * z) + (y * z))):Bool
[2]: ((y * z) = ((0 * z) + (y * z))):Bool
---> ((y * z) = (0 + (y * z))):Bool
[3]: ((y * z) = (0 + (y * z))):Bool
---> ((y * z) = (y * z)):Bool
[4]: ((y * z) = (y * z)):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 18 matches)
--> induction step
-- opening module PNAT*
-- reduce in %PNAT* : ((((s n) + y) * z) = (((s n) * z) + (y * z))):Bool
[1]: ((((s n) + y) * z) = (((s n) * z) + (y * z))):Bool
---> (((s (n + y)) * z) = (((s n) * z) + (y * z))):Bool
[2]: (((s (y + n)) * z) = (((s n) * z) + (y * z))):Bool
---> ((z + ((y + n) * z)) = (((s n) * z) + (y * z))):Bool
[3]: ((z + ((n + y) * z)) = (((s n) * z) + (y * z))):Bool
---> ((z + ((n * z) + (y * z))) = (((s n) * z) + (y * z))):Bool
[4]: (((n * z) + ((y * z) + z)) = (((s n) * z) + (y * z))):Bool
---> (((n * z) + ((y * z) + z)) = ((z + (n * z)) + (y * z))):Bool
[5]: (((n * z) + ((y * z) + z)) = ((y * z) + (z + (n * z)))):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 5 rewrites + 61 matches)
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 練習問題 2.5
--> ****************************************************************
--> ================================================================
--> proof score for proving associativity of _*_:
--> eq (X:Nat * Y:Nat) * Z:Nat = X * (Y * Z) .
--> with the induction on X:Nat
--> ----------------------------------------------------------------
--> induction base
-- opening module PNAT*
-- reduce in %PNAT* : (((0 * y) * z) = (0 * (y * z))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 6 matches)
--> induction step
-- opening module PNAT*
-- reduce in %PNAT* : ((((s n) * y) * z) = ((s n) * (y * z))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 82 matches)
--> QED
--> ================================================================
--> induction base
-- opening module PNAT*
-- reduce in %PNAT* : (((0 * y) * z) = (0 * (y * z))):Bool
[1]: (((0 * y) * z) = (0 * (y * z))):Bool
---> ((0 * z) = (0 * (y * z))):Bool
[2]: ((0 * z) = (0 * (y * z))):Bool
---> (0 = (0 * (y * z))):Bool
[3]: (0 = (0 * (y * z))):Bool
---> (0 = 0):Bool
[4]: (0 = 0):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 6 matches)
--> induction step
-- opening module PNAT*
-- reduce in %PNAT* : ((((s n) * y) * z) = ((s n) * (y * z))):Bool
[1]: ((((s n) * y) * z) = ((s n) * (y * z))):Bool
---> (((y + (n * y)) * z) = ((s n) * (y * z))):Bool
[2]: ((((n * y) + y) * z) = ((s n) * (y * z))):Bool
---> ((((n * y) * z) + (y * z)) = ((s n) * (y * z))):Bool
[3]: ((((n * y) * z) + (y * z)) = ((s n) * (y * z))):Bool
---> (((n * (y * z)) + (y * z)) = ((s n) * (y * z))):Bool
[4]: (((y * z) + (n * (y * z))) = ((s n) * (y * z))):Bool
---> (((y * z) + (n * (y * z))) = ((y * z) + (n * (y * z)))):Bool
[5]: (((y * z) + (n * (y * z))) = ((n * (y * z)) + (y * z))):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 5 rewrites + 82 matches)
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 2.11 階乗演算の等価性の証明
--> ****************************************************************
--> ----------------------------------------------------------------
--> Peano style natural numbers with assoc+comm _+_, _*_
--> which satisfy distributive law
--> ----------------------------------------------------------------
-- defining module! PNAT*ac
--> ----------------------------------------------------------------
--> factorial functions on Nat.PNAT*ac
--> ----------------------------------------------------------------
-- defining module! FACT
--> ================================================================
--> proof score for the property:
--> eq fact2(N1:Nat,N2:Nat) = fact1(N1) * N2 .
--> with the induction on N1:Nat
--> ----------------------------------------------------------------
--> induction base
-- opening module FACT
-- reduce in %FACT : (fact2(0,n2) = (fact1(0) * n2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 6 rewrites + 10 matches)
--> induction step
-- opening module FACT
-- reduce in %FACT : (fact2((s n1),n2) = (fact1((s n1)) * n2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 8 rewrites + 101 matches)
--> QED
--> ================================================================
--> induction base
-- opening module FACT
-- reduce in %FACT : (fact2(0,n2) = (fact1(0) * n2)):Bool
[1]: (fact2(0,n2) = (fact1(0) * n2)):Bool
---> (n2 = (fact1(0) * n2)):Bool
[2]: (n2 = (fact1(0) * n2)):Bool
---> (n2 = ((s 0) * n2)):Bool
[3]: (n2 = ((s 0) * n2)):Bool
---> (n2 = (n2 + (0 * n2))):Bool
[4]: (n2 = (n2 + (0 * n2))):Bool
---> (n2 = (n2 + 0)):Bool
[5]: (n2 = (n2 + 0)):Bool
---> (n2 = n2):Bool
[6]: (n2 = n2):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 6 rewrites + 10 matches)
--> induction step
-- opening module FACT
-- reduce in %FACT : (fact2((s n1),n2) = (fact1((s n1)) * n2)):Bool
[1]: (fact2((s n1),n2) = (fact1((s n1)) * n2)):Bool
---> (fact2(n1,((s n1) * n2)) = (fact1((s n1)) * n2)):Bool
[2]: (fact2(n1,((s n1) * n2)) = (fact1((s n1)) * n2)):Bool
---> ((fact1(n1) * ((s n1) * n2)) = (fact1((s n1)) * n2)):Bool
[3]: ((fact1(n1) * ((s n1) * n2)) = (fact1((s n1)) * n2)):Bool
---> ((fact1(n1) * (n2 + (n1 * n2))) = (fact1((s n1)) * n2)):Bool
[4]: ((fact1(n1) * ((n2 * n1) + n2)) = (fact1((s n1)) * n2)):Bool
---> (((fact1(n1) * (n2 * n1)) + (fact1(n1) * n2)) = (fact1((s n1)) * n2)):Bool
[5]: (((n2 * fact1(n1)) + (n2 * (n1 * fact1(n1)))) = (fact1((s n1)) * n2)):Bool
---> (((n2 * fact1(n1)) + (n2 * (n1 * fact1(n1)))) = (((s n1) * fact1(n1)) * n2)):Bool
[6]: (((n2 * fact1(n1)) + (n2 * (n1 * fact1(n1)))) = (((s n1) * fact1(n1)) * n2)):Bool
---> (((n2 * fact1(n1)) + (n2 * (n1 * fact1(n1)))) = ((fact1(n1) + (n1 * fact1(n1))) * n2)):Bool
[7]: (((n2 * fact1(n1)) + (n2 * (n1 * fact1(n1)))) = (((fact1(n1) * n1) + fact1(n1)) * n2)):Bool
---> (((n2 * fact1(n1)) + (n2 * (n1 * fact1(n1)))) = ((n2 * fact1(n1)) + (n2 * (fact1(n1) * n1)))):Bool
[8]: (((n2 * fact1(n1)) + (n2 * (n1 * fact1(n1)))) = ((fact1(n1) * (n1 * n2)) + (fact1(n1) * n2))):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 8 rewrites + 101 matches)
--> ================================================================
--> proof score for the property:
--> eq fact1(N:Nat) = fact2(N,s 0) .
--> ----------------------------------------------------------------
-- opening module FACT
-- reduce in %FACT : (fact1(n) = fact2(n,(s 0))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 17 matches)
--> QED
--> ================================================================
-- opening module FACT
-- reduce in %FACT : (fact1(n) = fact2(n,(s 0))):Bool
[1]: (fact1(n) = fact2(n,(s 0))):Bool
---> (fact1(n) = (fact1(n) * (s 0))):Bool
[2]: (fact1(n) = (fact1(n) * (s 0))):Bool
---> (fact1(n) = (fact1(n) + (0 * fact1(n)))):Bool
[3]: (fact1(n) = (fact1(n) + (0 * fact1(n)))):Bool
---> (fact1(n) = (fact1(n) + 0)):Bool
[4]: (fact1(n) = (fact1(n) + 0)):Bool
---> (fact1(n) = fact1(n)):Bool
[5]: (fact1(n) = fact1(n)):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 17 matches)
--> ****************************************************************
--> 2.11.1 停止性,合流性,十分完全性の判定
--> ****************************************************************
-- defining module! EVEN
-- defining module PNAT*ac-Wfuns
-- reading in file : nat
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/nat.cafe
-- defining module! NAT
-- reading in file : nznat
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/nznat.cafe
-- defining module! NZNAT
-- done reading in file: nznat
-- done reading in file: nat
-- opening module PNAT*ac-Wfuns
--> 22: eq 0 + Y:Nat = Y .
-- reduce in %PNAT*ac-Wfuns : (w1((0 + y))):NzNat
(3 + w1(y)):NzNat
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 27 matches)
-- reduce in %PNAT*ac-Wfuns : (w1(y)):NzNat
(w1(y)):NzNat
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 4 matches)
-- reduce in %PNAT*ac-Wfuns : (w2((0 + y))):NzNat
(w2(y) * 2):NzNat
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 18 matches)
-- reduce in %PNAT*ac-Wfuns : (w2(y)):NzNat
(w2(y)):NzNat
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 4 matches)
--> 23: eq (s X:Nat) + Y:Nat = s(X + Y) .
-- reduce in %PNAT*ac-Wfuns : (w1(((s x) + y))):NzNat
(3 + (w1(x) + w1(y))):NzNat
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 66 matches)
-- reduce in %PNAT*ac-Wfuns : (w1((s (x + y)))):NzNat
(3 + (w1(x) + w1(y))):NzNat
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 78 matches)
-- reduce in %PNAT*ac-Wfuns : (w2(((s x) + y))):NzNat
(w2(y) * (1 + w2(x))):NzNat
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 29 matches)
-- reduce in %PNAT*ac-Wfuns : (w2((s (x + y)))):NzNat
(1 + (w2(x) * w2(y))):NzNat
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 29 matches)
--> 28: eq 0 * Y:Nat = 0 .
-- reduce in %PNAT*ac-Wfuns : (w1((0 * y))):NzNat
(w1(y) * 2):NzNat
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 19 matches)
-- reduce in %PNAT*ac-Wfuns : (w1(0)):NzNat
(2):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
-- reduce in %PNAT*ac-Wfuns : (w2((0 * y))):NzNat
(w2(y) * 2):NzNat
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 19 matches)
-- reduce in %PNAT*ac-Wfuns : (w2(0)):NzNat
(2):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
--> 29: eq s X:Nat * Y:Nat = Y + X * Y .
-- reduce in %PNAT*ac-Wfuns : (w1(((s x) * y))):NzNat
(w1(y) * (2 + w1(x))):NzNat
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 30 matches)
-- reduce in %PNAT*ac-Wfuns : (w1((y + (x * y)))):NzNat
(w1(y) + (1 + (w1(x) * w1(y)))):NzNat
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 53 matches)
-- reduce in %PNAT*ac-Wfuns : (w2(((s x) * y))):NzNat
(w2(y) * (1 + w2(x))):NzNat
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 30 matches)
-- reduce in %PNAT*ac-Wfuns : (w2((y + (x * y)))):NzNat
(w2(y) * (w2(y) * w2(x))):NzNat
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 51 matches)
--> 30: eq X:Nat * (Y:Nat + Z:Nat) = X * Y + X * Z .
-- reduce in %PNAT*ac-Wfuns : (w1((x * (y + z)))):NzNat
(w1(x) * (w1(y) + (1 + w1(z)))):NzNat
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 53 matches)
-- reduce in %PNAT*ac-Wfuns : (w1(((x * y) + (x * z)))):NzNat
((w1(x) * w1(z)) + (1 + (w1(x) * w1(y)))):NzNat
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 71 matches)
-- reduce in %PNAT*ac-Wfuns : (w2((x * (y + z)))):NzNat
(w2(x) * (w2(z) * w2(y))):NzNat
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 51 matches)
-- reduce in %PNAT*ac-Wfuns : (w2(((x * y) + (x * z)))):NzNat
(w2(z) * (w2(x) * (w2(y) * w2(x)))):NzNat
(0.0000 sec for parse, 0.0001 sec for 3 rewrites + 129 matches)
--> 32: eq X:Nat + Y:Nat = Y + X .
-- reduce in %PNAT*ac-Wfuns : (w1((x + y))):NzNat
(w1(y) + (1 + w1(x))):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 35 matches)
-- reduce in %PNAT*ac-Wfuns : (w1((y + x))):NzNat
(w1(x) + (1 + w1(y))):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 35 matches)
-- reduce in %PNAT*ac-Wfuns : (w2((x + y))):NzNat
(w2(y) * w2(x)):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 21 matches)
-- reduce in %PNAT*ac-Wfuns : (w2((y + x))):NzNat
(w2(x) * w2(y)):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 21 matches)
--> 33: eq X:Nat + (Y:Nat + Z:Nat) = (X + Y) + Z .
-- reduce in %PNAT*ac-Wfuns : (w1(x) + w1((y + z))):NzNat
(w1(y) + (1 + (w1(z) + w1(x)))):NzNat
(0.0000 sec for parse, 0.0001 sec for 1 rewrites + 117 matches)
-- reduce in %PNAT*ac-Wfuns : (w1((x + y)) + w1(z)):NzNat
(w1(z) + (w1(x) + (1 + w1(y)))):NzNat
(0.0000 sec for parse, 0.0001 sec for 1 rewrites + 117 matches)
-- reduce in %PNAT*ac-Wfuns : (w2(x) + w2((y + z))):NzNat
((w2(z) * w2(y)) + w2(x)):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 31 matches)
-- reduce in %PNAT*ac-Wfuns : (w2((x + y)) + w2(z)):NzNat
(w2(z) + (w2(y) * w2(x))):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 31 matches)
--> 34: eq X:Nat * Y:Nat = Y * X .
-- reduce in %PNAT*ac-Wfuns : (w1((x * y))):NzNat
(w1(y) * w1(x)):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 22 matches)
-- reduce in %PNAT*ac-Wfuns : (w1((y * x))):NzNat
(w1(x) * w1(y)):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 22 matches)
-- reduce in %PNAT*ac-Wfuns : (w2((x * y))):NzNat
(w2(y) * w2(x)):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 22 matches)
-- reduce in %PNAT*ac-Wfuns : (w2((y * x))):NzNat
(w2(x) * w2(y)):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 22 matches)
--> 35: eq X:Nat * (Y:Nat * Z:Nat) = (X * Y) * Z .
-- reduce in %PNAT*ac-Wfuns : (w1(x) * w1((y * z))):NzNat
(w1(y) * (w1(z) * w1(x))):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 48 matches)
-- reduce in %PNAT*ac-Wfuns : (w1((x * y)) * w1(z)):NzNat
(w1(z) * (w1(x) * w1(y))):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 48 matches)
-- reduce in %PNAT*ac-Wfuns : (w2(x) * w2((y * z))):NzNat
(w2(y) * (w2(z) * w2(x))):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 48 matches)
-- reduce in %PNAT*ac-Wfuns : (w2((x * y)) * w2(z)):NzNat
(w2(z) * (w2(x) * w2(y))):NzNat
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 48 matches)
--> ****************************************************************
PNAT*> [Leaving CafeOBJ]
========================================
Running: chap3.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:10 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/chap3.cafe
--> ****************************************************************
--> 3 リストとパラメータ化モジュール
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 3.1 パラメータ化モジュールによるリストの定義
--> ****************************************************************
--> built-in module TRIV: trivial collection of elements
hwd:mod* TRIV
principal-sort Elt
{
signature {
[ Elt ]
}
}
--> TRIV is different from the user defined module TRIVu
-- defining module* TRIVud
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> because TRIVu has the built-in module BOOL as a sub-module
module* TRIVud
{
imports {
protecting (BOOL)
}
signature {
[ Elt ]
}
}
--> ----------------------------------------------------------------
--> parametrized list (i.e. generic list)
--> ----------------------------------------------------------------
-- defining module! LIST
--> ****************************************************************
--> 3.2 パラメータ化モジュールLISTの具体化
--> ****************************************************************
--> ----------------------------------------------------------------
--> PNAT: Peano NATural numbers
--> ----------------------------------------------------------------
-- defining module! PNAT
--> ----------------------------------------------------------------
--> LIST(PNAT)
--> ----------------------------------------------------------------
-- opening module LIST(X <= PNAT)
module LIST(X <= PNAT)
{ ** opening
imports {
protecting (PNAT)
}
signature {
[ List ]
op nil : -> List { constr prec: 0 }
op _ | _ : Nat List -> List { constr prec: 41 }
}
}
-- reduce in %LIST(X <= PNAT) : (nil = (0 | nil)):Bool
(nil = (0 | nil)):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 2 matches)
-- reduce in %LIST(X <= PNAT) : ((0 | nil) = ((s 0) | nil)):Bool
((0 | nil) = ((s 0) | nil)):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 2 matches)
-- reduce in %LIST(X <= PNAT) : (((s 0) | nil) = ((s 0) | nil)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
--> ----------------------------------------------------------------
--> order-sorted PNATnz
--> ----------------------------------------------------------------
-- defining module! PNATnz
--> ****************************************************************
--> 練習問題3.1 [LISTの具体化](1)の解答例
--> ****************************************************************
--> ----------------------------------------------------------------
--> LIST(PNATnz{sort Elt -> Nat})
--> ----------------------------------------------------------------
-- opening module LIST(X <= PNATnz{sort Elt -> Nat })
module LIST(X <= PNATnz{sort Elt -> Nat })
{ ** opening
imports {
protecting (PNATnz)
}
signature {
[ List ]
op nil : -> List { constr prec: 0 }
op _ | _ : Nat List -> List { constr prec: 41 }
}
}
-- reduce in %LIST(X <= PNATnz{ ... }) : (nil = (0 | nil)):Bool
(nil = (0 | nil)):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 2 matches)
-- reduce in %LIST(X <= PNATnz{ ... }) : ((0 | nil) = ((s 0) | nil)):Bool
((0 | nil) = ((s 0) | nil)):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 2 matches)
-- reduce in %LIST(X <= PNATnz{ ... }) : (((s 0) | nil) = ((s 0) | nil)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 練習問題3.1 [LISTの具体化](2)の解答例
--> ****************************************************************
--> ----------------------------------------------------------------
--> LIST(NAT)
--> ----------------------------------------------------------------
-- reading in file : nat
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/nat.cafe
-- defining module! NAT
-- reading in file : nznat
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/nznat.cafe
-- defining module! NZNAT
-- done reading in file: nznat
-- done reading in file: nat
-- opening module LIST(X <= NAT)
-- reduce in %LIST(X <= NAT) : (nil = (0 | nil)):Bool
(nil = (0 | nil)):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 2 matches)
-- reduce in %LIST(X <= NAT) : ((0 | nil) = (1 | nil)):Bool
((0 | nil) = (1 | nil)):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 2 matches)
-- reduce in %LIST(X <= NAT) : ((1 | nil) = (1 | nil)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 練習問題3.2 [主ソート]の解答例
--> ****************************************************************
--> ----------------------------------------------------------------
--> parameter module TRIV2 with principal-sort declaration
--> ----------------------------------------------------------------
-- defining module* TRIV2
--> ----------------------------------------------------------------
--> parametrized module LIST2 with parameter module TRIV2
--> ----------------------------------------------------------------
-- defining module! LIST2
--> ----------------------------------------------------------------
--> LIST2(NAT{sort EltSub -> NzNat})
--> ----------------------------------------------------------------
-- opening module LIST2(X2 <= NAT{sort EltSub -> NzNat })
module LIST2(X2 <= NAT{sort EltSub -> NzNat })
{ ** opening
imports {
protecting (NAT)
}
signature {
[ List ]
op nil : -> List { constr prec: 0 }
op _ | _ : Nat List -> List { constr prec: 41 }
}
}
-- reduce in %LIST2(X2 <= NAT{ ... }) : (nil = (0 | nil)):Bool
(nil = (0 | nil)):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 2 matches)
-- reduce in %LIST2(X2 <= NAT{ ... }) : ((0 | nil) = (1 | nil)):Bool
((0 | nil) = (1 | nil)):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 2 matches)
-- reduce in %LIST2(X2 <= NAT{ ... }) : ((1 | nil) = (1 | nil)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 練習問題3.3 [モジュール式の名前]の解答例
--> ****************************************************************
--> ----------------------------------------------------------------
--> make LISTofPNAT (LIST(PNAT))
--> ----------------------------------------------------------------
-- defining module LISTofPNAT
-- opening module LISTofPNAT
module LISTofPNAT
{ ** opening
imports {
protecting (LIST(X <= PNAT))
}
}
-- reduce in %LISTofPNAT : (nil = (0 | nil)):Bool
(nil = (0 | nil)):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 2 matches)
-- reduce in %LISTofPNAT : ((0 | nil) = ((s 0) | nil)):Bool
((0 | nil) = ((s 0) | nil)):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 2 matches)
-- reduce in %LISTofPNAT : (((s 0) | nil) = ((s 0) | nil)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 3.3 リストの等価性の定義
--> ****************************************************************
--> ----------------------------------------------------------------
--> trivial collection of elements with _=_
--> ----------------------------------------------------------------
-- defining module* TRIV=
................................(_ = _)................................
* rank: *Cosmos* *Cosmos* -> Bool
- attributes: { comm prec: 51 }
- axioms:
eq (CUX:*Cosmos* = CUX) = true
eq (true = false) = false
* rank: Elt Elt -> Bool
- attributes: { comm prec: 41 }
- axioms:
eq (CUX:*Cosmos* = CUX) = true
--> ----------------------------------------------------------------
--> parametrized list with _=_
--> ----------------------------------------------------------------
-- defining module! LIST=
................................(_ = _)................................
* rank: *Cosmos* *Cosmos* -> Bool
- attributes: { comm prec: 51 }
- axioms:
eq (CUX:*Cosmos* = CUX) = true
eq (true = false) = false
* rank: Elt Elt -> Bool
- attributes: { comm prec: 41 }
- axioms:
eq (CUX:*Cosmos* = CUX) = true
* rank: List List -> Bool
- attributes: { comm prec: 41 }
- axioms:
eq (nil = (E2:Elt | L2:List)) = false
eq ((E1:Elt | L1:List) = (E2:Elt | L2:List)) = ((E1 = E2) and (L1 = L2))
eq (CUX:*Cosmos* = CUX) = true
--> ****************************************************************
--> 3.4 パラメータ化モジュールLIST=の具体化}
--> ****************************************************************
--> ----------------------------------------------------------------
--> PNAT with _=_ on Nat
--> ----------------------------------------------------------------
-- defining module! PNATe
................................(_ = _)................................
* rank: *Cosmos* *Cosmos* -> Bool
- attributes: { comm prec: 51 }
- axioms:
eq (CUX:*Cosmos* = CUX) = true
eq (true = false) = false
* rank: Nat Nat -> Bool
- attributes: { comm prec: 41 }
- axioms:
eq (CUX:*Cosmos* = CUX) = true
--> ----------------------------------------------------------------
--> LIST=(PNATe)
--> ----------------------------------------------------------------
-- opening module LIST=(X <= PNATe)
module LIST=(X <= PNATe)
{ ** opening
imports {
protecting (PNATe)
protecting (LIST(X <= X.LIST)(X <= PNATe))
}
signature {
pred _ = _ : List List { comm prec: 41 }
}
axioms {
eq (nil = (E2:Nat | L2:List)) = false .
eq ((E1:Nat | L1:List) = (E2:Nat | L2:List))
= ((E1 = E2) and (L1 = L2)) .
}
}
-- reduce in %LIST=(X <= PNATe) : ((0 | nil) = nil):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
-- reduce in %LIST=(X <= PNATe) : (((s 0) | nil) = (0 | nil)):Bool
((s 0) = 0):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 10 matches)
-- reduce in %LIST=(X <= PNATe) : (((s 0) | nil) = ((s 0) | nil)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 9 matches)
--> ----------------------------------------------------------------
--> PNATe with equations
--> ----------------------------------------------------------------
-- defining module! PNATe=
................................(_ = _)................................
* rank: *Cosmos* *Cosmos* -> Bool
- attributes: { comm prec: 51 }
- axioms:
eq (CUX:*Cosmos* = CUX) = true
eq (true = false) = false
* rank: Nat Nat -> Bool
- attributes: { comm prec: 41 }
- axioms:
eq (0 = (s Y:Nat)) = false
eq ((s X:Nat) = (s Y:Nat)) = (X = Y)
eq (CUX:*Cosmos* = CUX) = true
--> ----------------------------------------------------------------
--> LIST=(PNATe=)
--> ----------------------------------------------------------------
-- opening module LIST=(X <= PNATe=)
module LIST=(X <= PNATe=)
{ ** opening
imports {
protecting (PNATe=)
protecting (LIST(X <= X.LIST)(X <= PNATe=))
}
signature {
pred _ = _ : List List { comm prec: 41 }
}
axioms {
eq (nil = (E2:Nat | L2:List)) = false .
eq ((E1:Nat | L1:List) = (E2:Nat | L2:List))
= ((E1 = E2) and (L1 = L2)) .
}
}
-- reduce in %LIST=(X <= PNATe=) : ((0 | nil) = nil):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
-- reduce in %LIST=(X <= PNATe=) : (((s 0) | nil) = (0 | nil)):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 7 matches)
-- reduce in %LIST=(X <= PNATe=) : (((s 0) | nil) = ((s 0) | nil)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 13 matches)
--> ----------------------------------------------------------------
--> order-sorted PNATnz with _=_ and _==_
--> ----------------------------------------------------------------
-- defining module! PNATnzee
--> ----------------------------------------------------------------
--> LIST=(PNATnzee{sort Elt -> Nat})
--> ----------------------------------------------------------------
-- opening module LIST=(X <= PNATnzee{sort Elt -> Nat })
module LIST=(X <= PNATnzee{sort Elt -> Nat })
{ ** opening
imports {
protecting (PNATnzee)
protecting (LIST(X <= X.LIST)(X <= PNATnzee))
}
signature {
pred _ = _ : List List { comm prec: 41 }
}
axioms {
eq (nil = (E2:Nat | L2:List)) = false .
eq ((E1:Nat | L1:List) = (E2:Nat | L2:List))
= ((E1 = E2) and (L1 = L2)) .
}
}
-- reduce in %LIST=(X <= PNATnzee{ ... }) : ((0 | nil) = nil):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
-- reduce in %LIST=(X <= PNATnzee{ ... }) : (((s 0) | nil) = (0 | nil)):Bool
((s 0) = 0):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 10 matches)
-- reduce in %LIST=(X <= PNATnzee{ ... }) : (((s 0) | nil) = ((s 0) | nil)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 9 matches)
--> ----------------------------------------------------------------
--> LIST=(PNATnzee{sort Elt -> Nat,op _=_ -> _==_})
--> ----------------------------------------------------------------
-- opening module LIST=(X <= PNATnzee{sort Elt -> Nat, op _ = _ -> _ == _ })
module LIST=(X <= PNATnzee{sort Elt -> Nat, op _ = _ -> _ == _ })
{ ** opening
imports {
protecting (PNATnzee)
protecting (LIST(X <= X.LIST)(X <= PNATnzee))
}
signature {
pred _ = _ : List List { comm prec: 41 }
}
axioms {
eq (nil = (E2:Nat | L2:List)) = false .
eq ((E1:Nat | L1:List) = (E2:Nat | L2:List))
= ((E1 == E2) and (L1 = L2)) .
}
}
-- reduce in %LIST=(X <= PNATnzee{ ... }) : ((0 | nil) = nil):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
-- reduce in %LIST=(X <= PNATnzee{ ... }) : (((s 0) | nil) = (0 | nil)):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 7 matches)
-- reduce in %LIST=(X <= PNATnzee{ ... }) : (((s 0) | nil) = ((s 0) | nil)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 9 matches)
--> ----------------------------------------------------------------
--> view TRIV=toPNATnzee from TRIV= to PNATnzee
--> ----------------------------------------------------------------
-- defining view
-- opening module LIST=(X <= TRIV=toPNATnzee)TRIV=toPNATnzee
module LIST=(X <= TRIV=toPNATnzee)
{ ** opening
imports {
protecting (PNATnzee)
protecting (LIST(X <= X.LIST)(X <= PNATnzee))
}
signature {
pred _ = _ : List List { comm prec: 41 }
}
axioms {
eq (nil = (E2:Nat | L2:List)) = false .
eq ((E1:Nat | L1:List) = (E2:Nat | L2:List))
= ((E1 == E2) and (L1 = L2)) .
}
}
-- reduce in %LIST=(X <= TRIV=toPNATnzee) : ((0 | nil) = nil):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
-- reduce in %LIST=(X <= TRIV=toPNATnzee) : (((s 0) | nil) = (0 | nil)):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 7 matches)
-- reduce in %LIST=(X <= TRIV=toPNATnzee) : (((s 0) | nil) = ((s 0) | nil)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 9 matches)
--> ****************************************************************
--> 3.4.2 式による演算の定義
--> ****************************************************************
-- opening module LIST=(X <= PNAT{op E1:Elt = E2:Elt -> E1:Nat = E2:Nat })
-- reduce in %LIST=(X <= PNAT{ ... }) : ((0 | nil) = nil):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
-- reduce in %LIST=(X <= PNAT{ ... }) : (((s 0) | nil) = (0 | nil)):Bool
((s 0) = 0):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 12 matches)
-- reduce in %LIST=(X <= PNAT{ ... }) : (((s 0) | nil) = ((s 0) | nil)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 9 matches)
-- opening module LIST=(X <= PNAT{op E1:Elt = E2:Elt -> E1:Nat == E2:Nat })
module LIST=(X <= PNAT{op E1:Elt = E2:Elt -> E1:Nat == E2:Nat })
{ ** opening
imports {
protecting (PNAT)
protecting (LIST(X <= X.LIST)(X <= PNAT))
}
signature {
pred _ = _ : List List { comm prec: 41 }
}
axioms {
eq (nil = (E2:Nat | L2:List)) = false .
eq ((E1:Nat | L1:List) = (E2:Nat | L2:List))
= ((E1 == E2) and (L1 = L2)) .
}
}
-- reduce in %LIST=(X <= PNAT{ ... }) : ((0 | nil) = nil):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
-- reduce in %LIST=(X <= PNAT{ ... }) : (((s 0) | nil) = (0 | nil)):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 7 matches)
-- reduce in %LIST=(X <= PNAT{ ... }) : (((s 0) | nil) = ((s 0) | nil)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 9 matches)
--> target of an operator can be any complex term
-- opening module LIST=(X <= NAT{op ( E1:Elt = E2:Elt ) -> ( ( E1:Nat <= E2:Nat ) and ( E1:Nat >= E2:Nat ) ) })
module LIST=(X <= NAT{op ( E1:Elt = E2:Elt ) -> ( ( E1:Nat <= E2:Nat ) and ( E1:Nat >= E2:Nat ) ) })
{ ** opening
imports {
protecting (NAT)
protecting (LIST(X <= X.LIST)(X <= NAT))
}
signature {
pred _ = _ : List List { comm prec: 41 }
}
axioms {
eq (nil = (E2:Nat | L2:List)) = false .
eq ((E1:Nat | L1:List) = (E2:Nat | L2:List))
= ((E1 <= E2) and ((E1 >= E2) and (L1 = L2))) .
}
}
-- reduce in %LIST=(X <= NAT{ ... }) : ((0 | nil) = nil):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
-- reduce in %LIST=(X <= NAT{ ... }) : ((1 | nil) = (0 | nil)):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 6 rewrites + 12 matches)
-- reduce in %LIST=(X <= NAT{ ... }) : ((1 | nil) = (1 | nil)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 6 rewrites + 13 matches)
--> ****************************************************************
--> 3.4.3 モジュール式
--> ****************************************************************
--> renaming sort and op
-- opening module LIST(X <= PNATnz{sort Elt -> Nat }) * {sort List -> ListOfPnat, op (_ | _) -> (_ $ _)}
((s 0) $ nil):ListOfPnat
--> rename and module sum
-- opening module LIST(X <= PNAT) * {sort List -> ListOfPnat} + LIST(X <= PNAT) * {op (_ | _) -> (_ $ _)}
((s 0) | nil):ListOfPnat
((s 0) $ nil):List
--> rename and module sum
-- opening module LIST(X <= PNAT) * {sort List -> ListOfPnat} + LIST(X <= PNAT)
[Warning]: Ambiguous term:
please try `check regularity' command.
if the signature is regular, there possibly be
some name conflicts between operators and variables.
[1] _|_ : Nat List -> List --------------------((s 0) | nil)
[2] _|_ : Nat ListOfPnat -> ListOfPnat ((s 0) | nil)
[Error]: no successful parse
("ambiguous term"):SyntaxErr
((s 0) | nil):List
((s 0) | nil):ListOfPnat
-- defining module LISTofPNATnz
-- defining module LISTofPNAT
[Warning]: Redefining module LISTofPNAT
-- opening module LISTofPNATnz + LISTofPNAT
[Warning]: Ambiguous term:
please try `check regularity' command.
if the signature is regular, there possibly be
some name conflicts between operators and variables.
[1] _|_ : Nat.PNATnz List.LIST(X <= PNATnz{ ... }) -> List.LIST(X <= PNATnz{ ... }) ((s 0) | nil)
[2] _|_ : Nat.PNAT List.LIST(X <= PNAT) -> List.LIST(X <= PNAT) ((s 0) | nil)
[Error]: no successful parse
("ambiguous term"):SyntaxErr
((s 0) | nil):List.LIST(X <= PNATnz{ ... })
((s 0) | nil):List.LIST(X <= PNAT)
-- opening module LIST(X <= PNAT)
((s 0) | nil):List
-- defining module 2LISTofPNATa
-- opening module 2LISTofPNATa
[Warning]: Ambiguous term:
please try `check regularity' command.
if the signature is regular, there possibly be
some name conflicts between operators and variables.
[1] _|_ : Nat List.LIST(X <= PNAT) -> List.LIST(X <= PNAT) ((s 0) | nil)
[2] _|_ : Nat List.LIST(X <= PNAT) -> List.LIST(X <= PNAT) ((s 0) | nil)
[Error]: no successful parse
("ambiguous term"):SyntaxErr
-- defining module 2LISTofPNATb
-- opening module 2LISTofPNATb
((s 0) | nil):List
--> ****************************************************************
--> 3.4.4 モジュール式の例: ペアのペアのペア
--> ****************************************************************
--> ----------------------------------------------------------------
--> PAIR
--> ----------------------------------------------------------------
-- defining module! PAIR
-- opening module PAIR(X <= NAT, Y <= NAT)
(1):NzNat
(1 , 2):Pair
--> ----------------------------------------------------------------
--> PAIRofNAT
--> ----------------------------------------------------------------
-- defining module! PAIRofNAT
(1):NzNat
(1 , 2):PairOfNat
--> ----------------------------------------------------------------
--> PAIRofPAIRofNAT
--> ----------------------------------------------------------------
-- defining module! PAIRofPAIRofNAT
(1):NzNat
(1 , 2):PairOfNat
(1 , (1 , 2)):PairOfPairOfNat
((1 , 2) , 2):PairOfPairOfNat
((1 , 2) , (1 , 2)):PairOfPairOfNat
--> ----------------------------------------------------------------
--> PAIRofPAIRofPAIRofNAT
--> ----------------------------------------------------------------
-- defining module! PAIRofPAIRofPAIRofNAT
(1):NzNat
(1 , 2):PairOfNat
(1 , (1 , 2)):PairOfPairOfNat
(1 , (1 , (1 , 2))):PairOfPairOfPairOfNat
((1 , 2) , (1 , (1 , 2))):PairOfPairOfPairOfNat
(((1 , 2) , (1 , 2)) , ((1 , 2) , (1 , 2))):PairOfPairOfPairOfNat
--> ****************************************************************
--> 3.5 リストの連接
--> ****************************************************************
--> ----------------------------------------------------------------
--> lists with append operation _@_
--> ----------------------------------------------------------------
-- defining module! LIST@
-- opening module LIST@(X)
-- reduce in %LIST@(X) : ((e1 | (e2 | (e3 | nil))) @ (e1 | (e2 | (e3 | nil)))):List
[1]: ((e1 | (e2 | (e3 | nil))) @ (e1 | (e2 | (e3 | nil)))):List
---> (e1 | ((e2 | (e3 | nil)) @ (e1 | (e2 | (e3 | nil))))):List
[2]: (e1 | ((e2 | (e3 | nil)) @ (e1 | (e2 | (e3 | nil))))):List
---> (e1 | (e2 | ((e3 | nil) @ (e1 | (e2 | (e3 | nil)))))):List
[3]: (e1 | (e2 | ((e3 | nil) @ (e1 | (e2 | (e3 | nil)))))):List
---> (e1 | (e2 | (e3 | (nil @ (e1 | (e2 | (e3 | nil))))))):List
[4]: (e1 | (e2 | (e3 | (nil @ (e1 | (e2 | (e3 | nil))))))):List
---> (e1 | (e2 | (e3 | (e1 | (e2 | (e3 | nil)))))):List
(e1 | (e2 | (e3 | (e1 | (e2 | (e3 | nil)))))):List
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 7 matches)
--> ****************************************************************
--> 3.6 連接の右nilの証明
--> ****************************************************************
--> ================================================================
--> Proof score for proving that nil is right-identity of _@_ (@ri)
--> i.e. 'eq L:List @ nil = L .'
--> with the induction on the L:List
--> ----------------------------------------------------------------
--> induction base
-- reduce in LIST@(X) : ((nil @ nil) = nil):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 2 matches)
--> induction step
-- opening module LIST@(X)
--> induction hypothesis
-- reduce in %LIST@(X) : (((e | l) @ nil) = (e | l)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 5 matches)
--> QED
--> ================================================================
--> induction base
-- reduce in LIST@(X) : ((nil @ nil) = nil):Bool
[1]: ((nil @ nil) = nil):Bool
---> (nil = nil):Bool
[2]: (nil = nil):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 2 matches)
--> induction step
-- opening module LIST@(X)
--> induction hypothesis
-- reduce in %LIST@(X) : (((e | l) @ nil) = (e | l)):Bool
[1]: (((e | l) @ nil) = (e | l)):Bool
---> ((e | (l @ nil)) = (e | l)):Bool
[2]: ((e | (l @ nil)) = (e | l)):Bool
---> ((e | l) = (e | l)):Bool
[3]: ((e | l) = (e | l)):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 5 matches)
--> ****************************************************************
--> 練習問題3.7 [連接の結合則の証明]
--> ****************************************************************
--> ================================================================
--> Proof score for proving that _@_ is associative,
--> i.e. 'eq (L1:List @ L2:List) @ L3:List = L1 @ (L2 @ L3) .'
--> with the induction on the L1:List
--> ----------------------------------------------------------------
--> induction base
-- opening module LIST@(X)
-- reduce in %LIST@(X) : (((nil @ l2) @ l3) = (nil @ (l2 @ l3))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 11 matches)
--> induction step
-- opening module LIST@(X)
-- reduce in %LIST@(X) : ((((e | l1) @ l2) @ l3) = ((e | l1) @ (l2 @ l3))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 47 matches)
--> QED
--> ================================================================
--> induction base
-- opening module LIST@(X)
-- reduce in %LIST@(X) : (((nil @ l2) @ l3) = (nil @ (l2 @ l3))):Bool
[1]: (((nil @ l2) @ l3) = (nil @ (l2 @ l3))):Bool
---> ((l2 @ l3) = (nil @ (l2 @ l3))):Bool
[2]: ((l2 @ l3) = (nil @ (l2 @ l3))):Bool
---> ((l2 @ l3) = (l2 @ l3)):Bool
[3]: ((l2 @ l3) = (l2 @ l3)):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 11 matches)
--> induction step
-- opening module LIST@(X)
-- reduce in %LIST@(X) : ((((e | l1) @ l2) @ l3) = ((e | l1) @ (l2 @ l3))):Bool
[1]: ((((e | l1) @ l2) @ l3) = ((e | l1) @ (l2 @ l3))):Bool
---> (((e | (l1 @ l2)) @ l3) = ((e | l1) @ (l2 @ l3))):Bool
[2]: (((e | (l1 @ l2)) @ l3) = ((e | l1) @ (l2 @ l3))):Bool
---> ((e | ((l1 @ l2) @ l3)) = ((e | l1) @ (l2 @ l3))):Bool
[3]: ((e | ((l1 @ l2) @ l3)) = ((e | l1) @ (l2 @ l3))):Bool
---> ((e | (l1 @ (l2 @ l3))) = ((e | l1) @ (l2 @ l3))):Bool
[4]: ((e | (l1 @ (l2 @ l3))) = ((e | l1) @ (l2 @ l3))):Bool
---> ((e | (l1 @ (l2 @ l3))) = (e | (l1 @ (l2 @ l3)))):Bool
[5]: ((e | (l1 @ (l2 @ l3))) = (e | (l1 @ (l2 @ l3)))):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 47 matches)
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 3.7 リストの反転
--> ****************************************************************
--> ----------------------------------------------------------------
--> lists with associative append _@_
--> ----------------------------------------------------------------
-- defining module! LIST@a
--> ----------------------------------------------------------------
--> reverse operation on List
--> ----------------------------------------------------------------
-- defining module! LISTrev
-- opening module LISTrev(X)
-- reduce in %LISTrev(X) : (rev((e1 | (e2 | (e3 | nil))))):List
[1]: (rev((e1 | (e2 | (e3 | nil))))):List
---> (rev((e2 | (e3 | nil))) @ (e1 | nil)):List
[2]: (rev((e2 | (e3 | nil))) @ (e1 | nil)):List
---> ((rev((e3 | nil)) @ (e2 | nil)) @ (e1 | nil)):List
[3]: ((rev((e3 | nil)) @ (e2 | nil)) @ (e1 | nil)):List
---> (((rev(nil) @ (e3 | nil)) @ (e2 | nil)) @ (e1 | nil)):List
[4]: (((rev(nil) @ (e3 | nil)) @ (e2 | nil)) @ (e1 | nil)):List
---> (((nil @ (e3 | nil)) @ (e2 | nil)) @ (e1 | nil)):List
[5]: (((nil @ (e3 | nil)) @ (e2 | nil)) @ (e1 | nil)):List
---> (((e3 | nil) @ (e2 | nil)) @ (e1 | nil)):List
[6]: (((e3 | nil) @ (e2 | nil)) @ (e1 | nil)):List
---> ((e3 | (nil @ (e2 | nil))) @ (e1 | nil)):List
[7]: ((e3 | (nil @ (e2 | nil))) @ (e1 | nil)):List
---> ((e3 | (e2 | nil)) @ (e1 | nil)):List
[8]: ((e3 | (e2 | nil)) @ (e1 | nil)):List
---> (e3 | ((e2 | nil) @ (e1 | nil))):List
[9]: (e3 | ((e2 | nil) @ (e1 | nil))):List
---> (e3 | (e2 | (nil @ (e1 | nil)))):List
[10]: (e3 | (e2 | (nil @ (e1 | nil)))):List
---> (e3 | (e2 | (e1 | nil))):List
(e3 | (e2 | (e1 | nil))):List
(0.0000 sec for parse, 0.0001 sec for 10 rewrites + 25 matches)
--> ****************************************************************
--> 3.8 反転の分配則の証明
--> ****************************************************************
--> ================================================================
--> Proof score for proving that rev distributes over _@_
--> reversely, i.e.
--> eq rev(L1:List @ L2:List) = rev(L2) @ rev(L1) .
--> with the induction on L1:List
--> ----------------------------------------------------------------
--> induction base
-- opening module LISTrev(X)
-- reduce in %LISTrev(X) : (rev((nil @ l2)) = (rev(l2) @ rev(nil))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 18 matches)
--> induction step
-- opening module LISTrev(X)
-- reduce in %LISTrev(X) : (rev(((e | l1) @ l2)) = (rev(l2) @ rev((e | l1)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 5 rewrites + 97 matches)
--> QED
--> ================================================================
--> induction base
-- opening module LISTrev(X)
-- reduce in %LISTrev(X) : (rev((nil @ l2)) = (rev(l2) @ rev(nil))):Bool
[1]: (rev((nil @ l2)) = (rev(l2) @ rev(nil))):Bool
---> (rev(l2) = (rev(l2) @ rev(nil))):Bool
[2]: (rev(l2) = (rev(l2) @ rev(nil))):Bool
---> (rev(l2) = (rev(l2) @ nil)):Bool
[3]: (rev(l2) = (rev(l2) @ nil)):Bool
---> (rev(l2) = rev(l2)):Bool
[4]: (rev(l2) = rev(l2)):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 18 matches)
--> induction step
-- opening module LISTrev(X)
-- reduce in %LISTrev(X) : (rev(((e | l1) @ l2)) = (rev(l2) @ rev((e | l1)))):Bool
[1]: (rev(((e | l1) @ l2)) = (rev(l2) @ rev((e | l1)))):Bool
---> (rev((e | (l1 @ l2))) = (rev(l2) @ rev((e | l1)))):Bool
[2]: (rev((e | (l1 @ l2))) = (rev(l2) @ rev((e | l1)))):Bool
---> ((rev((l1 @ l2)) @ (e | nil)) = (rev(l2) @ rev((e | l1)))):Bool
[3]: ((rev((l1 @ l2)) @ (e | nil)) = (rev(l2) @ rev((e | l1)))):Bool
---> (((rev(l2) @ rev(l1)) @ (e | nil)) = (rev(l2) @ rev((e | l1)))):Bool
[4]: (((rev(l2) @ rev(l1)) @ (e | nil)) = (rev(l2) @ rev((e | l1)))):Bool
---> (((rev(l2) @ rev(l1)) @ (e | nil)) = (rev(l2) @ (rev(l1) @ (e | nil)))):Bool
[5]: (((rev(l2) @ rev(l1)) @ (e | nil)) = (rev(l2) @ (rev(l1) @ (e | nil)))):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 5 rewrites + 97 matches)
--> ****************************************************************
--> 練習問題3.5 [反転の反転が恒等の証明]
--> ****************************************************************
--> ================================================================
--> Proof score for proving that rev(rev(_)) is the identity
--> function (revrev),
--> i.e. 'eq rev(rev(L:List) = L .'
--> with the induction on L:List
--> ================================================================
--> induction base
-- reduce in LISTrev(X) : (rev(rev(nil)) = nil):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 3 matches)
--> induction step
-- opening module LISTrev(X)
-- reduce in %LISTrev(X) : (rev(rev((e | l))) = (e | l)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 9 rewrites + 42 matches)
--> QED
--> ================================================================
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 練習問題3.6 [2引数の反転演算]
--> ****************************************************************
--> ----------------------------------------------------------------
--> 2 argument reverse operation on List
--> ----------------------------------------------------------------
-- defining module! LISTrev2
--> ================================================================
--> Proof score for proving:
--> 'eq rev2(L1:List,L2:List) = rev(L1) @ L2 .'
--> with the induction on L1:List
--> ================================================================
--> induction base
-- opening module LISTrev2(X)
-- reduce in %LISTrev2(X) : (rev2(nil,l2) = (rev(nil) @ l2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 4 matches)
--> induction step
-- opening module LISTrev2(X)
-- reduce in %LISTrev2(X) : (rev2((e | l1),l2) = (rev((e | l1)) @ l2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 6 rewrites + 58 matches)
--> QED
--> ================================================================
--> induction base
-- opening module LISTrev2(X)
-- reduce in %LISTrev2(X) : (rev2(nil,l2) = (rev(nil) @ l2)):Bool
[1]: (rev2(nil,l2) = (rev(nil) @ l2)):Bool
---> (l2 = (rev(nil) @ l2)):Bool
[2]: (l2 = (rev(nil) @ l2)):Bool
---> (l2 = (nil @ l2)):Bool
[3]: (l2 = (nil @ l2)):Bool
---> (l2 = l2):Bool
[4]: (l2 = l2):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 4 matches)
--> induction step
-- opening module LISTrev2(X)
-- reduce in %LISTrev2(X) : (rev2((e | l1),l2) = (rev((e | l1)) @ l2)):Bool
[1]: (rev2((e | l1),l2) = (rev((e | l1)) @ l2)):Bool
---> (rev2(l1,(e | l2)) = (rev((e | l1)) @ l2)):Bool
[2]: (rev2(l1,(e | l2)) = (rev((e | l1)) @ l2)):Bool
---> ((rev(l1) @ (e | l2)) = (rev((e | l1)) @ l2)):Bool
[3]: ((rev(l1) @ (e | l2)) = (rev((e | l1)) @ l2)):Bool
---> ((rev(l1) @ (e | l2)) = ((rev(l1) @ (e | nil)) @ l2)):Bool
[4]: ((rev(l1) @ (e | l2)) = ((rev(l1) @ (e | nil)) @ l2)):Bool
---> ((rev(l1) @ (e | l2)) = (rev(l1) @ (e | (nil @ l2)))):Bool
[5]: ((rev(l1) @ (e | l2)) = (rev(l1) @ (e | (nil @ l2)))):Bool
---> ((rev(l1) @ (e | l2)) = (rev(l1) @ (e | l2))):Bool
[6]: ((rev(l1) @ (e | l2)) = (rev(l1) @ (e | l2))):Bool
---> (true):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 6 rewrites + 58 matches)
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
LISTrev(X)> [Leaving CafeOBJ]
========================================
Running: chap4.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:10 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/chap4.cafe
--> ****************************************************************
--> 4 列、集合と仕様計算
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 4.1 列の定義
--> ****************************************************************
--> ----------------------------------------------------------------
--> SEQ -- 汎用データ構造「列」
--> ----------------------------------------------------------------
-- defining module! SEQ
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ================================================================
--> SEQの基本テスト
--> ----------------------------------------------------------------
-- reading in file : nat
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/nat.cafe
-- defining module! NAT
-- reading in file : nznat
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/nznat.cafe
-- defining module! NZNAT
-- done reading in file: nznat
-- done reading in file: nat
-- opening module SEQ(X <= NAT)
.................................(_ _).................................
* rank: Seq Seq -> Seq
- attributes: { assoc id: nil constr prec: 41 r-assoc }
- axioms:
eq [ident0]: (nil X-ID:Seq) = X-ID
eq [ident1]: (Y-ID:Seq nil) = Y-ID
-- reduce in %SEQ(X <= NAT) : (((1 2) 3) = (1 (2 3))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 1 rewrites + 33 matches)
--> true
-- reduce in %SEQ(X <= NAT) : (((1 2) (3 4)) = ((1 (2 3)) 4)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 49 matches)
--> true
-- reduce in %SEQ(X <= NAT) : ((nil ((1 nil) (2 nil))) = (1 2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 36 matches)
--> true
................................(_ = _)................................
* rank: *Cosmos* *Cosmos* -> Bool
- attributes: { comm prec: 51 }
- axioms:
eq (CUX:*Cosmos* = CUX) = true
eq (true = false) = false
-- reduce in %SEQ(X <= NAT) : (1 = (1 2)):Bool
(1 = (1 2)):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 10 matches)
--> (1 = (1 2))
-- reduce in %SEQ(X <= NAT) : ((1 2) = (2 1)):Bool
((1 2) = (2 1)):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 18 matches)
--> ((1 2) = (2 1))
--> ================================================================
--> 自然数の列に少なくとも2つの1があるかを検査する述語
--> ----------------------------------------------------------------
-- opening module SEQ(X <= NAT)
-- reduce in %SEQ(X <= NAT) : (inc1&1((1 2))):Bool
(false):Bool
(0.0000 sec for parse, 0.0001 sec for 2 rewrites + 42 matches)
--> false
-- reduce in %SEQ(X <= NAT) : (inc1&1((1 1))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 42 matches)
--> true
-- reduce in %SEQ(X <= NAT) : (inc1&1((1 (1 1)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 50 matches)
--> true
-- reduce in %SEQ(X <= NAT) : (inc1&1((1 (2 3)))):Bool
(false):Bool
(0.0000 sec for parse, 0.0001 sec for 2 rewrites + 50 matches)
--> false
-- reduce in %SEQ(X <= NAT) : (inc1&1(((2 (1 3)) (1 4)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 2 rewrites + 66 matches)
--> true
-- reduce in %SEQ(X <= NAT) : (inc1&1(((((((1 (2 3)) (4 5)) (6 7)) (8 9)) (10 11)) (12 13)))):Bool
(false):Bool
(0.0001 sec for parse, 0.0526 sec for 2 rewrites + 130 matches)
--> false
-- reduce in %SEQ(X <= NAT) : (inc1&1(((2 (1 3)) (1 4)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 2 rewrites + 66 matches)
--> true
-- reduce in %SEQ(X <= NAT) : (inc1&1(((1 3) (1 4)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 2 rewrites + 58 matches)
--> true
-- reduce in %SEQ(X <= NAT) : (inc1&1(((2 1) (3 1)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 2 rewrites + 58 matches)
--> true
-- reduce in %SEQ(X <= NAT) : (inc1&1(((2 1) (1 4)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 2 rewrites + 58 matches)
--> true
-- reduce in %SEQ(X <= NAT) : (inc1&1((1 (1 4)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 2 rewrites + 50 matches)
--> true
-- reduce in %SEQ(X <= NAT) : (inc1&1((1 (3 1)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 2 rewrites + 50 matches)
--> true
-- reduce in %SEQ(X <= NAT) : (inc1&1((2 (1 1)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 50 matches)
--> true
-- reduce in %SEQ(X <= NAT) : (inc1&1((1 1))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 42 matches)
--> true
--> ****************************************************************
--> 練習問題4.1 [自然数列の述語](1),(2)の解答例
--> ****************************************************************
-- opening module SEQ(X <= NAT)
--> ================================================================
--> (1)自然数の列に1,2,3がこの順番で現れるかを検査する述語
--> ----------------------------------------------------------------
-- reduce in %SEQ(X <= NAT) : (inc1&2&3((1 2))):Bool
(false):Bool
(0.0000 sec for parse, 0.0001 sec for 2 rewrites + 58 matches)
--> false
-- reduce in %SEQ(X <= NAT) : (inc1&2&3((3 (1 2)))):Bool
(false):Bool
(0.0000 sec for parse, 0.0002 sec for 2 rewrites + 66 matches)
--> fale
-- reduce in %SEQ(X <= NAT) : (inc1&2&3((1 (2 3)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 2 rewrites + 66 matches)
--> true
-- reduce in %SEQ(X <= NAT) : (inc1&2&3(((2 1) (2 1)))):Bool
(false):Bool
(0.0000 sec for parse, 0.0006 sec for 2 rewrites + 74 matches)
--> false
-- reduce in %SEQ(X <= NAT) : (inc1&2&3(((((2 1) (2 1)) (1 3)) (4 3)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0017 sec for 2 rewrites + 106 matches)
--> true
--> ================================================================
--> (2)自然数の列に1が最低2回現れかつ同じ自然数が最低3回現れるかを検査する述語
--> ----------------------------------------------------------------
-- reduce in %SEQ(X <= NAT) : (inc1&1^incN&N&N((1 (1 1)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 4 rewrites + 102 matches)
--> true
-- reduce in %SEQ(X <= NAT) : (inc1&1^incN&N&N(((1 2) (2 2)))):Bool
(false):Bool
(0.0000 sec for parse, 0.0003 sec for 4 rewrites + 108 matches)
--> false
-- reduce in %SEQ(X <= NAT) : (inc1&1^incN&N&N(((3 (1 3)) (1 3)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0003 sec for 4 rewrites + 118 matches)
--> true
-- reduce in %SEQ(X <= NAT) : (inc1&1^incN&N&N((((3 1) (3 1)) (3 1)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0005 sec for 4 rewrites + 126 matches)
--> true
-- reduce in %SEQ(X <= NAT) : (inc1&1^incN&N&N((((((2 3) (4 1)) (5 2)) (6 1)) (7 8)))):Bool
(false):Bool
(0.0001 sec for parse, 0.0808 sec for 4 rewrites + 156 matches)
--> false
-- reduce in %SEQ(X <= NAT) : (inc1&1^incN&N&N((((((2 (3 4)) (1 5)) (2 6)) (1 7)) (2 8)))):Bool
(true):Bool
(0.0001 sec for parse, 0.0096 sec for 4 rewrites + 166 matches)
--> true
--> ****************************************************************
--> 練習問題4.1 [自然数列の述語](3)の解答例
--> ****************************************************************
--> ----------------------------------------------------------------
--> SEQidr -- 'idr: nil'を使った汎用データ構造「列」
--> ----------------------------------------------------------------
-- defining module! SEQidr
--> ================================================================
--> SEQidr(NAT)で自然数の列に少なくとも2つの1があるかを検査する述語
--> ----------------------------------------------------------------
-- opening module SEQidr(X <= NAT)
-- reduce in %SEQidr(X <= NAT) : (inc1&1(((2 (1 3)) (1 4)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 66 matches)
--> true
-- reduce in %SEQidr(X <= NAT) : (inc1&1(((1 3) (1 4)))):Bool
(false):Bool
(0.0000 sec for parse, 0.0001 sec for 2 rewrites + 58 matches)
--> false
-- reduce in %SEQidr(X <= NAT) : (inc1&1(((2 1) (3 1)))):Bool
(false):Bool
(0.0000 sec for parse, 0.0001 sec for 2 rewrites + 58 matches)
--> false
-- reduce in %SEQidr(X <= NAT) : (inc1&1(((2 1) (1 4)))):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 58 matches)
--> false
-- reduce in %SEQidr(X <= NAT) : (inc1&1((1 (1 4)))):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 50 matches)
--> false
-- reduce in %SEQidr(X <= NAT) : (inc1&1((1 (3 1)))):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 50 matches)
--> false
-- reduce in %SEQidr(X <= NAT) : (inc1&1((2 (1 1)))):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 50 matches)
--> false
-- reduce in %SEQidr(X <= NAT) : (inc1&1((1 1))):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 42 matches)
--> false
-- reduce in %SEQidr(X <= NAT) : (inc1&1(((2 (1 3)) (1 4)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 2 rewrites + 66 matches)
--> true
-- reduce in %SEQidr(X <= NAT) : (inc1&1(((1 3) (1 4)))):Bool
(false):Bool
(0.0000 sec for parse, 0.0001 sec for 2 rewrites + 58 matches)
--> false
-- reduce in %SEQidr(X <= NAT) : (inc1&1(((2 1) (3 1)))):Bool
(false):Bool
(0.0000 sec for parse, 0.0001 sec for 2 rewrites + 58 matches)
--> false
-- reduce in %SEQidr(X <= NAT) : (inc1&1(((2 1) (1 4)))):Bool
(false):Bool
(0.0000 sec for parse, 0.0001 sec for 2 rewrites + 58 matches)
--> false
-- reduce in %SEQidr(X <= NAT) : (inc1&1((1 (1 4)))):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 50 matches)
--> false
-- reduce in %SEQidr(X <= NAT) : (inc1&1((1 (3 1)))):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 50 matches)
--> false
-- reduce in %SEQidr(X <= NAT) : (inc1&1((2 (1 1)))):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 50 matches)
--> false
-- reduce in %SEQidr(X <= NAT) : (inc1&1((1 1))):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 42 matches)
--> false
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 4.2 列の反転
--> ****************************************************************
--> ----------------------------------------------------------------
--> SEQrev1 -- 列上の1引数反転演算
--> ----------------------------------------------------------------
-- defining module! SEQrev1
--> ================================================================
--> 反転 rev1(1 2 3 4) のトレース
--> ----------------------------------------------------------------
-- opening module SEQrev1(X <= NAT)
-- reduce in %SEQrev1(X <= NAT) : (rev1(((1 2) (3 4)))):Seq
[1]: (rev1(((1 2) (3 4)))):Seq
---> (rev1((2 (3 4))) 1):Seq
[2]: (rev1((2 (3 4))) 1):Seq
---> ((rev1((3 4)) 2) 1):Seq
[3]: ((rev1((3 4)) 2) 1):Seq
---> (((rev1(4) 3) 2) 1):Seq
[4]: (((rev1(4) 3) 2) 1):Seq
---> ((((rev1(nil) 4) 3) 2) 1):Seq
[5]: ((((rev1(nil) 4) 3) 2) 1):Seq
---> ((((nil 4) 3) 2) 1):Seq
[6]: ((((nil 4) 3) 2) 1):Seq
---> (((4 3) 2) 1):Seq
((4 3) (2 1)):Seq
(0.0000 sec for parse, 0.0001 sec for 6 rewrites + 106 matches)
--> ----------------------------------------------------------------
--> ================================================================
--> モジュールSEQrev1で,rev1が演算__に逆順で分配する,つまり条件付き等式
--> cq[r1d]: rev1(S1:Seq S2:Seq) = rev1(S2) rev1(S1)
--> if not((S1 == nil) or (S2 == nil)) .
--> が成り立つことを,
--> S1:Seqに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> proof goal module
--> ----------------------------------------------------------------
-- defining module SEQr1d
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- defining module SEQr1d-base
-- opening module SEQr1d-base(X.SEQrev1)
--> check the base
-- reduce in %SEQr1d-base(X.SEQrev1) : (r1d(nil,s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 18 rewrites + 22 matches)
-- opening module SEQr1d-base(X.SEQrev1)
--> check the base
-- reduce in %SEQr1d-base(X.SEQrev1) : (r1d(nil,s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 13 rewrites + 33 matches)
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- defining module SEQr1d-step
-- opening module SEQr1d-step(X.SEQrev1)
--> check the step
-- reduce in %SEQr1d-step(X.SEQrev1) : (r1d((e s1),s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 29 rewrites + 58 matches)
-- opening module SEQr1d-step(X.SEQrev1)
--> check the step
-- reduce in %SEQr1d-step(X.SEQrev1) : (r1d((e s1),s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 19 rewrites + 106 matches)
-- opening module SEQr1d-step(X.SEQrev1)
--> check the step
-- reduce in %SEQr1d-step(X.SEQrev1) : (r1d((e s1),s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 21 rewrites + 77 matches)
-- opening module SEQr1d-step(X.SEQrev1)
--> check the step
-- reduce in %SEQr1d-step(X.SEQrev1) : (r1d((e s1),s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 19 rewrites + 148 matches)
--> ================================================================
--> QED -- 証明終
--> ================================================================
--> ================================================================
--> モジュールSEQrev1で,rev1を2度適用すると恒等演算になる,つまり等式
--> eq rev1(rev1(S:Seq) = S .
--> が成り立つことを,
--> S:Seqに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> induction base
--> ----------------------------------------------------------------
--> check the base
-- reduce in SEQrev1(X) : (rev1(rev1(nil)) = nil):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 3 matches)
--> ----------------------------------------------------------------
--> induction step
--> ----------------------------------------------------------------
-- opening module SEQrev1(X)
--> check the step
-- reduce in %SEQrev1(X) : (rev1(rev1((e s))) = (e s)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 20 rewrites + 95 matches)
--> ================================================================
--> QED
--> ================================================================
--> ----------------------------------------------------------------
--> SEQrev2 -- リスト上の2引数反転演算
--> ----------------------------------------------------------------
-- defining module! SEQrev2
--> ================================================================
--> 反転 rev2(1 2 3 4,nil) のトレース
--> ----------------------------------------------------------------
-- opening module SEQrev2(X <= NAT)
-- reduce in %SEQrev2(X <= NAT) : (rev2(((1 2) (3 4)),nil)):Seq
[1]: (rev2(((1 2) (3 4)),nil)):Seq
---> (rev2((2 (3 4)),1)):Seq
[2]: (rev2((2 (3 4)),1)):Seq
---> (rev2((3 4),(2 1))):Seq
[3]: (rev2((3 4),(2 1))):Seq
---> (rev2(4,(3 (2 1)))):Seq
[4]: (rev2(4,(3 (2 1)))):Seq
---> (rev2(nil,(4 (3 (2 1))))):Seq
[5]: (rev2(nil,(4 (3 (2 1))))):Seq
---> (4 (3 (2 1))):Seq
((4 3) (2 1)):Seq
(0.0000 sec for parse, 0.0001 sec for 5 rewrites + 105 matches)
--> ****************************************************************
--> 練習問題4.2 [rev2]の解答例
--> ****************************************************************
--> ================================================================
--> モジュールSEQrev2で等式
--> eq rev2(S1:Set,S2:Seq) = rev1(S1) S2 .
--> が成り立つことを,
--> S1:Seqに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> induction base
--> ----------------------------------------------------------------
-- opening module SEQrev2(X)
--> check the base
-- reduce in %SEQrev2(X) : (rev2(nil,s2) = (rev1(nil) s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 4 matches)
--> ----------------------------------------------------------------
--> induction step
--> ----------------------------------------------------------------
-- opening module SEQrev2(X)
--> check the step
-- reduce in %SEQrev2(X) : (rev2((e s1),s2) = (rev1((e s1)) s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 61 matches)
--> ================================================================
--> QED
--> ================================================================
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 4.3 列の等価性
--> ****************************************************************
--> ----------------------------------------------------------------
--> TRIV=e -- 等価述語_=e_が宣言されたTRIV
--> ----------------------------------------------------------------
-- defining module* TRIV=e
--> ----------------------------------------------------------------
--> SEQ=s -- 等価述語_=s_が宣言されたSEQ
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ================================================================
--> SEQ=sの基本テスト
--> ----------------------------------------------------------------
-- opening module SEQ=s(X <= NAT{op ( E1:Elt =e E2:Elt ) -> ( E1:Nat = E2:Nat ) })
-- reduce in %SEQ=s(X <= NAT{ ... }) : (1 =s 2):Bool
(1 = 2):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 11 matches)
--> (1 = 2)
-- reduce in %SEQ=s(X <= NAT{ ... }) : (1 =s (1 2)):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 15 matches)
--> false
-- reduce in %SEQ=s(X <= NAT{ ... }) : ((1 2) =s (1 3)):Bool
(2 = 3):Bool
(0.0000 sec for parse, 0.0000 sec for 6 rewrites + 36 matches)
--> (2 = 3)
-- reduce in %SEQ=s(X <= NAT{ ... }) : ((1 2) =s (1 2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 17 matches)
--> true
-- opening module SEQ=s(X <= NAT{op ( E1:Elt =e E2:Elt ) -> ( E1:Nat == E2:Nat ) })
-- reduce in %SEQ=s(X <= NAT{ ... }) : (1 =s 2):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 6 matches)
--> false
-- reduce in %SEQ=s(X <= NAT{ ... }) : (1 =s (1 2)):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 15 matches)
--> false
-- reduce in %SEQ=s(X <= NAT{ ... }) : ((1 2) =s (1 3)):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 7 rewrites + 27 matches)
--> false
-- reduce in %SEQ=s(X <= NAT{ ... }) : ((1 2) =s (1 2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 17 matches)
--> true
--> ****************************************************************
--> 4.4 多重集合の定義
--> ****************************************************************
--> ----------------------------------------------------------------
--> MSET -- 汎用データ構造「多重集合」
--> ----------------------------------------------------------------
-- defining module! MSET
--> ================================================================
--> MSETの基本テスト
--> ----------------------------------------------------------------
-- opening module MSET(X <= NAT)
.................................(_ _).................................
* rank: MSet MSet -> MSet
- attributes: { assoc comm id: empty constr prec: 41 r-assoc }
- axioms:
eq [ident0]: (empty X-ID:MSet) = X-ID
-- reduce in %MSET(X <= NAT) : ((1 (1 2)) = (1 (2 1))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 9 matches)
--> true
-- reduce in %MSET(X <= NAT) : ((2 (1 empty)) = (1 (2 empty))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 7 matches)
--> true
................................(_ = _)................................
* rank: *Cosmos* *Cosmos* -> Bool
- attributes: { comm prec: 51 }
- axioms:
eq (CUX:*Cosmos* = CUX) = true
eq (true = false) = false
-- reduce in %MSET(X <= NAT) : ((1 1) = 1):Bool
((1 1) = 1):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 4 matches)
--> ((1 1) = 1)
-- reduce in %MSET(X <= NAT) : ((1 empty) = 2):Bool
(1 = 2):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 3 matches)
--> (1 = 2)
--> ================================================================
--> 自然数の多重集合に少なくとも1が2つと2が1つが含まれるかを検査する述語
--> ----------------------------------------------------------------
-- opening module MSET(X <= NAT)
-- reduce in %MSET(X <= NAT) : (inc1&1&2(1)):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 18 matches)
--> false
-- reduce in %MSET(X <= NAT) : (inc1&1&2((1 2))):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 20 matches)
--> false
-- reduce in %MSET(X <= NAT) : (inc1&1&2((1 (1 2)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 22 matches)
--> true
-- reduce in %MSET(X <= NAT) : (inc1&1&2((1 (2 (2 1))))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 30 matches)
--> true
-- reduce in %MSET(X <= NAT) : (inc1&1&2((4 (3 (1 2))))):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 30 matches)
--> false
--> ****************************************************************
--> 4.5 集合の定義
--> ****************************************************************
--> ----------------------------------------------------------------
--> SET -- 汎用データ構造「集合」
--> ----------------------------------------------------------------
-- defining module! SET
--> ================================================================
--> SETの基本テスト
--> ----------------------------------------------------------------
-- opening module SET(X <= NAT)
.................................(_ _).................................
* rank: Set Set -> Set
- attributes: { assoc comm id: empty constr prec: 41 r-assoc }
- axioms:
ceq (S:Set S) = S
if (not (S == empty))
eq [ident0]: (empty X-ID:Set) = X-ID
-- reduce in %SET(X <= NAT) : ((2 (1 (1 2))) = (1 2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 9 rewrites + 35 matches)
--> true
-- reduce in %SET(X <= NAT) : ((2 (1 empty)) = (1 (2 empty))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 3 rewrites + 19 matches)
--> true
................................(_ = _)................................
* rank: *Cosmos* *Cosmos* -> Bool
- attributes: { comm prec: 51 }
- axioms:
eq (CUX:*Cosmos* = CUX) = true
eq (true = false) = false
-- reduce in %SET(X <= NAT) : (1 = (1 2)):Bool
(1 = (1 2)):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 7 matches)
--> (1 = 1 2)
-- reduce in %SET(X <= NAT) : ((1 2) = (2 3)):Bool
((1 2) = (2 3)):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 12 matches)
--> ((1 2) = (2 3))
-- reduce in %SET(X <= NAT) : ((S:Set S) := empty):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 7 matches)
--> true
-- reduce in %SET(X <= NAT) : (empty):Set
(empty):Set
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 0 matches)
--> empty
-- reduce in %SET(X <= NAT) : (s s):Set
(s):Set
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 6 matches)
--> s
--> ================================================================
--> 自然数の集合に1と2がともに含まれるかを検査する述語
--> ----------------------------------------------------------------
-- opening module SET(X <= NAT)
-- reduce in %SET(X <= NAT) : (inc1&2(1)):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 22 matches)
--> false
-- reduce in %SET(X <= NAT) : (inc1&2((1 2))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 27 matches)
--> true
-- reduce in %SET(X <= NAT) : (inc1&2((1 (1 2)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 6 rewrites + 39 matches)
--> true
-- reduce in %SET(X <= NAT) : (inc1&2((1 (2 (2 1))))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 10 rewrites + 51 matches)
--> true
-- reduce in %SET(X <= NAT) : (inc1&2((4 (3 (1 2))))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 52 matches)
--> true
--> ****************************************************************
--> 練習問題4.3[自然数の多重集合の述語]の解答例
--> ****************************************************************
--> (1)の解答
--> ****************************************************************
--> ================================================================
--> 自然数の多重集合が「1を2個以上含みかつ2を2個以下含む」
--> を満たすかを判定する述語.
--> ----------------------------------------------------------------
-- opening module MSET(X <= NAT)
-- reduce in %MSET(X <= NAT) : (inc1&1^~inc2&2&2((1 2))):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 6 rewrites + 36 matches)
--> false
-- reduce in %MSET(X <= NAT) : (inc1&1^~inc2&2&2((1 (2 1)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 6 rewrites + 42 matches)
--> true
-- reduce in %MSET(X <= NAT) : (inc1&1^~inc2&2&2((2 (1 (1 2))))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 6 rewrites + 58 matches)
--> true
-- reduce in %MSET(X <= NAT) : (inc1&1^~inc2&2&2((1 (2 (2 (1 1)))))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 6 rewrites + 78 matches)
--> true
-- reduce in %MSET(X <= NAT) : (inc1&1^~inc2&2&2((2 (2 (1 (1 (1 2))))))):Bool
(false):Bool
(0.0000 sec for parse, 0.0001 sec for 6 rewrites + 110 matches)
--> false
--> ****************************************************************
--> (2)の解答
--> ****************************************************************
--> ================================================================
--> 自然数の集合が「1と2をともに含みかつ3と4のいずれかを含まない」
--> を満たすかを反転する述語.
--> ----------------------------------------------------------------
-- opening module SET(X <= NAT)
-- reduce in %SET(X <= NAT) : (inc1&2^~inc3&4(1)):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 6 rewrites + 48 matches)
--> false
-- reduce in %SET(X <= NAT) : (inc1&2^~inc3&4(2)):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 6 rewrites + 48 matches)
--> false
-- reduce in %SET(X <= NAT) : (inc1&2^~inc3&4((1 2))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 6 rewrites + 60 matches)
--> true
-- reduce in %SET(X <= NAT) : (inc1&2^~inc3&4((1 (2 3)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 6 rewrites + 70 matches)
--> true
-- reduce in %SET(X <= NAT) : (inc1&2^~inc3&4((1 (2 4)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 6 rewrites + 70 matches)
--> true
-- reduce in %SET(X <= NAT) : (inc1&2^~inc3&4((4 (3 (1 2))))):Bool
(false):Bool
(0.0000 sec for parse, 0.0001 sec for 6 rewrites + 106 matches)
--> false
--> ****************************************************************
--> (3)の解答
--> ****************************************************************
--> ================================================================
--> 自然数の集合が「1と2を含むときは3を含む」を満たすかを判定する述語.
--> ----------------------------------------------------------------
-- opening module SET(X <= NAT)
-- reduce in %SET(X <= NAT) : (inc1&2->inc3(1)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 7 rewrites + 36 matches)
--> true
-- reduce in %SET(X <= NAT) : (inc1&2->inc3(2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 7 rewrites + 36 matches)
--> true
-- reduce in %SET(X <= NAT) : (inc1&2->inc3(3)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 7 rewrites + 36 matches)
--> true
-- reduce in %SET(X <= NAT) : (inc1&2->inc3((1 2))):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 7 rewrites + 42 matches)
--> false
-- reduce in %SET(X <= NAT) : (inc1&2->inc3((2 3))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 7 rewrites + 46 matches)
--> true
-- reduce in %SET(X <= NAT) : (inc1&2->inc3((3 1))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 7 rewrites + 46 matches)
--> true
-- reduce in %SET(X <= NAT) : (inc1&2->inc3((1 (2 3)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 7 rewrites + 56 matches)
--> true
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 4.6 集合の和と積
--> ****************************************************************
--> ----------------------------------------------------------------
--> SETin -- 述語_in_が定義された集合
--> ----------------------------------------------------------------
-- defining module! SETin
--> ================================================================
--> SETinの基本テスト
--> ----------------------------------------------------------------
-- opening module SETin(X <= NAT{op E1:Elt =e E2:Elt -> E1:Nat == E2:Nat })
-- reduce in %SETin(X <= NAT{ ... }) : (1 in empty):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
--> false
-- reduce in %SETin(X <= NAT{ ... }) : (1 in 1):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 7 matches)
--> true
-- reduce in %SETin(X <= NAT{ ... }) : (1 in (1 2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 7 rewrites + 18 matches)
--> true
-- reduce in %SETin(X <= NAT{ ... }) : (3 in (1 2)):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 7 rewrites + 14 matches)
--> false
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
-- defining module! SET^
--> ================================================================
--> SET^の基本テスト
--> ----------------------------------------------------------------
-- opening module SET^(X <= NAT{op E1:Elt =e E2:Elt -> E1:Nat == E2:Nat })
-- reduce in %SET^(X <= NAT{ ... }) : ((1 (2 3)) ^ (2 (3 4))):Set
(3 2):Set
(0.0000 sec for parse, 0.0001 sec for 38 rewrites + 131 matches)
--> (2 3)
-- reduce in %SET^(X <= NAT{ ... }) : ((((1 2) ^ (2 3)) ^ (3 4)) =s ((1 2) ^ ((2 3) ^ (3 4)))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 64 rewrites + 140 matches)
--> true
-- reduce in %SET^(X <= NAT{ ... }) : (((1 2) ^ (2 3)) =s ((2 3) ^ (1 2))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 41 rewrites + 95 matches)
--> true
-- reduce in %SET^(X <= NAT{ ... }) : (((1 2) ^ (1 2)) =s (1 2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 21 rewrites + 63 matches)
--> true
--> ****************************************************************
--> 4.7 メンバー述語の集合積への分配則の証明
--> ****************************************************************
--> ================================================================
--> モジュールSET^で,メンバー述語の集合積への分配則,つまり等式
--> eq[in^]: E:Elt in (S1:Set ^ S2:Set) = E in S1 and E in S2 .
--> が成り立つことを,
--> S1:Setに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- opening module SET^(X)
--> check the base
-- reduce in %SET^(X) : ((e in (empty ^ s2)) = ((e in empty) and (e in s2))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 11 matches)
--> ----------------------------------------------------------------
--> induction step module
--> ----------------------------------------------------------------
-- defining module SET^-in^-iStep
--> ================================================================
--> check the induction step
--> ----------------------------------------------------------------
--> ((e1 in s2) = true) and (e = e1)
-- opening module SET^-in^-iStep(X.SET^)
-- reduce in %SET^-in^-iStep(X.SET^) : (iStep):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 19 rewrites + 81 matches)
--> ((e1 in s2) = true) and ((e =e e1) = false)
-- opening module SET^-in^-iStep(X.SET^)
-- reduce in %SET^-in^-iStep(X.SET^) : (iStep):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 12 rewrites + 110 matches)
--> ((e1 in s2) = false) and (e = e1)
-- opening module SET^-in^-iStep(X.SET^)
-- reduce in %SET^-in^-iStep(X.SET^) : (iStep):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 16 rewrites + 52 matches)
--> ((e1 in s2) = false) and ((e =e e1) = false)
-- opening module SET^-in^-iStep(X.SET^)
-- reduce in %SET^-in^-iStep(X.SET^) : (iStep):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 9 rewrites + 74 matches)
--> ================================================================
--> QED
--> ================================================================
--> ****************************************************************
--> 4.8 場合分けと仕様計算
--> ****************************************************************
--> ****************************************************************
--> 4.9 仕様計算コマンド
--> ****************************************************************
--> ----------------------------------------------------------------
--> check the induction step proposition iStep
--> in module SET^-in^-iStep with specCalc commands (1)
--> ----------------------------------------------------------------
** Beginning a new proof in SET^-in^-iStep
-- reading in file : int
-- done reading in file: int
:goal { ** root -----------------------------------------
-- context module: SET^-in^-iStep
-- sentence to be proved
eq iStep = true .
}
** Initial goal (root) is generated. **
[RD-]=> :goal{root}
(consumed 0.0005 sec, including 14 rewrites + 378 matches)
>> Next target goal is "root".
>> Remaining 1 goal.
-- reduce in #Goal-root(X.SET^) : (iStep):Bool
((e in (if (e1 in s2) then (e1 (s1 ^ s2)) else (s1 ^ s2) fi)) = (((e in s1) and (e in s2)) xor (((e =e e1) and (e in s2)) xor ((e =e e1) and ((e in s1) and (e in s2)))))):Bool
(0.0000 sec for parse, 0.0001 sec for 6 rewrites + 186 matches)
e1s2 defined as :csp{eq (e1 in s2) = true . eq (e1 in s2) = false . }
[e1s2]=> :goal{root}
** Generated 2 goals
(consumed 0.0009 sec, including 0 rewrites + 0 matches)
>> Next target goal is "1".
>> Remaining 2 goals.
[RD-]=> :goal{1}
(consumed 0.0006 sec, including 24 rewrites + 468 matches)
>> Next target goal is "1".
>> Remaining 2 goals.
e=e1 defined as :csp{eq e = e1 . eq (e =e e1) = false . }
[e=e1]=> :goal{1}
** Generated 2 goals
(consumed 0.0008 sec, including 0 rewrites + 0 matches)
>> Next target goal is "1-1".
>> Remaining 3 goals.
[RD-]=> :goal{1-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1".
(consumed 0.0003 sec, including 20 rewrites + 83 matches)
>> Next target goal is "1-2".
>> Remaining 2 goals.
[RD-]=> :goal{1-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-2".
(consumed 0.0003 sec, including 13 rewrites + 112 matches)
>> Next target goal is "2".
>> Remaining 1 goal.
[RD-]=> :goal{2}
[e=e1]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "2-1".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "2-2".
(consumed 0.0019 sec, including 47 rewrites + 484 matches)
** All goals are successfully discharged.
--> ----------------------------------------------------------------
--> QED
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> the above proof score with :show/:red/:desc commands
--> ----------------------------------------------------------------
:goal { ** root -----------------------------------------
-- context module: SET^-in^-iStep
-- sentence to be proved
eq iStep = true .
}
** Initial goal (root) is generated. **>root
:goal { ** root -----------------------------------------
-- context module: SET^-in^-iStep
-- sentence to be proved
eq iStep = true .
}
[RD-]=> :goal{root}
(consumed 0.0004 sec, including 14 rewrites + 378 matches)
>> Next target goal is "root".
>> Remaining 1 goal.
>root
:goal { ** root -----------------------------------------
-- context module: SET^-in^-iStep
-- sentence to be proved
eq iStep = true .
}
-- reduce in #Goal-root(X.SET^) : (iStep):Bool
((e in (if (e1 in s2) then (e1 (s1 ^ s2)) else (s1 ^ s2) fi)) = (((e in s1) and (e in s2)) xor (((e =e e1) and (e in s2)) xor ((e =e e1) and ((e in s1) and (e in s2)))))):Bool
(0.0000 sec for parse, 0.0001 sec for 6 rewrites + 186 matches)
e1s2 defined as :csp{eq (e1 in s2) = true . eq (e1 in s2) = false . }
[e1s2]=> :goal{root}
** Generated 2 goals
(consumed 0.0008 sec, including 0 rewrites + 0 matches)
>> Next target goal is "1".
>> Remaining 2 goals.
root
>[e1s2] 1
[e1s2] 2
:csp{eq (e1 in s2) = true . eq (e1 in s2)
= false . }=>
:goal { ** 1 -----------------------------------------
-- context module: SET^-in^-iStep
-- introduced axiom
eq [e1s2]: (e1 in s2) = true .
-- sentence to be proved
eq iStep = true .
}
[RD-]=> :goal{1}
(consumed 0.0005 sec, including 24 rewrites + 468 matches)
>> Next target goal is "1".
>> Remaining 2 goals.
root
>[e1s2] 1
[e1s2] 2
:csp{eq (e1 in s2) = true . eq (e1 in s2)
= false . }=>
:goal { ** 1 -----------------------------------------
-- context module: SET^-in^-iStep
-- introduced axiom
eq [e1s2]: (e1 in s2) = true .
-- sentence to be proved
eq iStep = true .
}
-- reduce in #Goal-1(X.SET^) : (iStep):Bool
((((e in s1) and (e in s2)) xor ((e =e e1) xor ((e =e e1) and ((e in s2) and (e in s1))))) = (((e in s1) and (e in s2)) xor (((e =e e1) and (e in s2)) xor ((e =e e1) and ((e in s1) and (e in s2)))))):Bool
(0.0000 sec for parse, 0.0001 sec for 11 rewrites + 231 matches)
e=e1 defined as :csp{eq e = e1 . eq (e =e e1) = false . }
[e=e1]=> :goal{1}
** Generated 2 goals
(consumed 0.0008 sec, including 0 rewrites + 0 matches)
>> Next target goal is "1-1".
>> Remaining 3 goals.
root
[e1s2] 1
>[e=e1] 1-1
[e=e1] 1-2
[e1s2] 2
:csp{eq e = e1 . eq (e =e e1) = false . }=>
:goal { ** 1-1 -----------------------------------------
-- context module: SET^-in^-iStep
-- introduced axioms
eq [e1s2]: (e1 in s2) = true .
eq [e=e1]: e = e1 .
-- sentence to be proved
eq iStep = true .
}
[RD-]=> :goal{1-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1".
(consumed 0.0003 sec, including 20 rewrites + 83 matches)
>> Next target goal is "1-2".
>> Remaining 2 goals.
root
[e1s2] 1
[e=e1] 1-1*
>[e=e1] 1-2
[e1s2] 2
:csp{eq e = e1 . eq (e =e e1) = false . }=>
:goal { ** 1-2 -----------------------------------------
-- context module: SET^-in^-iStep
-- introduced axioms
eq [e1s2]: (e1 in s2) = true .
eq [e=e1]: (e =e e1) = false .
-- sentence to be proved
eq iStep = true .
}
[RD-]=> :goal{1-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-2".
(consumed 0.0003 sec, including 13 rewrites + 112 matches)
>> Next target goal is "2".
>> Remaining 1 goal.
root
[e1s2] 1*
[e=e1] 1-1*
[e=e1] 1-2*
>[e1s2] 2
:csp{eq (e1 in s2) = true . eq (e1 in s2)
= false . }=>
:goal { ** 2 -----------------------------------------
-- context module: SET^-in^-iStep
-- introduced axiom
eq [e1s2]: (e1 in s2) = false .
-- sentence to be proved
eq iStep = true .
}
[RD-]=> :goal{2}
[e=e1]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "2-1".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "2-2".
(consumed 0.0019 sec, including 47 rewrites + 484 matches)
** All goals are successfully discharged.
root*
[e1s2] 1*
[e=e1] 1-1*
[e=e1] 1-2*
[e1s2] 2*
[e=e1] 2-1*
[e=e1] 2-2*==> root*
-- context module: #Goal-root
-- targeted sentence:
eq iStep = true .
[e1s2] 1*
-- context module: #Goal-1
-- assumption
eq [e1s2]: (e1 in s2) = true .
-- targeted sentence:
eq iStep = true .
[e=e1] 1-1*
-- context module: #Goal-1-1
-- assumptions
eq [e1s2]: (e1 in s2) = true .
eq [e=e1]: e = e1 .
-- discharged sentence:
eq [RD-]: iStep = true .
[e=e1] 1-2*
-- context module: #Goal-1-2
-- assumptions
eq [e1s2]: (e1 in s2) = true .
eq [e=e1]: (e =e e1) = false .
-- discharged sentence:
eq [RD-]: iStep = true .
[e1s2] 2*
-- context module: #Goal-2
-- assumption
eq [e1s2]: (e1 in s2) = false .
-- targeted sentence:
eq iStep = true .
[e=e1] 2-1*
-- context module: #Goal-2-1
-- assumptions
eq [e1s2]: (e1 in s2) = false .
eq [e=e1]: e = e1 .
-- discharged sentence:
eq [RD-]: iStep = true .
[e=e1] 2-2*
-- context module: #Goal-2-2
-- assumptions
eq [e1s2]: (e1 in s2) = false .
eq [e=e1]: (e =e e1) = false .
-- discharged sentence:
eq [RD-]: iStep = true .
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
:goal { ** root -----------------------------------------
-- context module: SET^-in^-iStep
-- sentence to be proved
eq iStep = true .
}
** Initial goal (root) is generated. **>root
:goal { ** root -----------------------------------------
-- context module: SET^-in^-iStep
-- sentence to be proved
eq iStep = true .
}
[RD-]=> :goal{root}
(consumed 0.0004 sec, including 14 rewrites + 378 matches)
>> Next target goal is "root".
>> Remaining 1 goal.
>root
:goal { ** root -----------------------------------------
-- context module: SET^-in^-iStep
-- sentence to be proved
eq iStep = true .
}
-- reduce in #Goal-root(X.SET^) : (iStep):Bool
((e in (if (e1 in s2) then (e1 (s1 ^ s2)) else (s1 ^ s2) fi)) = (((e in s1) and (e in s2)) xor (((e =e e1) and (e in s2)) xor ((e =e e1) and ((e in s1) and (e in s2)))))):Bool
(0.0000 sec for parse, 0.0001 sec for 6 rewrites + 186 matches)
e1s2 defined as :csp{eq (e1 in s2) = true . eq (e1 in s2) = false . }
[e1s2]=> :goal{root}
** Generated 2 goals
(consumed 0.0008 sec, including 0 rewrites + 0 matches)
>> Next target goal is "1".
>> Remaining 2 goals.
root
>[e1s2] 1
[e1s2] 2
:csp{eq (e1 in s2) = true . eq (e1 in s2)
= false . }=>
:goal { ** 1 -----------------------------------------
-- context module: SET^-in^-iStep
-- introduced axiom
eq [e1s2]: (e1 in s2) = true .
-- sentence to be proved
eq iStep = true .
}
[RD-]=> :goal{1}
(consumed 0.0005 sec, including 24 rewrites + 468 matches)
>> Next target goal is "1".
>> Remaining 2 goals.
root
>[e1s2] 1
[e1s2] 2
:csp{eq (e1 in s2) = true . eq (e1 in s2)
= false . }=>
:goal { ** 1 -----------------------------------------
-- context module: SET^-in^-iStep
-- introduced axiom
eq [e1s2]: (e1 in s2) = true .
-- sentence to be proved
eq iStep = true .
}
e=e1 defined as :csp{eq e = e1 . eq (e =e e1) = false . }
[e=e1]=> :goal{1}
** Generated 2 goals
(consumed 0.0008 sec, including 0 rewrites + 0 matches)
>> Next target goal is "1-1".
>> Remaining 3 goals.
root
[e1s2] 1
>[e=e1] 1-1
[e=e1] 1-2
[e1s2] 2
:csp{eq e = e1 . eq (e =e e1) = false . }=>
:goal { ** 1-1 -----------------------------------------
-- context module: SET^-in^-iStep
-- introduced axioms
eq [e1s2]: (e1 in s2) = true .
eq [e=e1]: e = e1 .
-- sentence to be proved
eq iStep = true .
}
[RD-]=> :goal{1-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1".
(consumed 0.0003 sec, including 20 rewrites + 83 matches)
>> Next target goal is "1-2".
>> Remaining 2 goals.
root
[e1s2] 1
[e=e1] 1-1*
>[e=e1] 1-2
[e1s2] 2
:csp{eq e = e1 . eq (e =e e1) = false . }=>
:goal { ** 1-2 -----------------------------------------
-- context module: SET^-in^-iStep
-- introduced axioms
eq [e1s2]: (e1 in s2) = true .
eq [e=e1]: (e =e e1) = false .
-- sentence to be proved
eq iStep = true .
}
[RD-]=> :goal{1-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-2".
(consumed 0.0003 sec, including 13 rewrites + 112 matches)
>> Next target goal is "2".
>> Remaining 1 goal.
root
[e1s2] 1*
[e=e1] 1-1*
[e=e1] 1-2*
>[e1s2] 2
:csp{eq (e1 in s2) = true . eq (e1 in s2)
= false . }=>
:goal { ** 2 -----------------------------------------
-- context module: SET^-in^-iStep
-- introduced axiom
eq [e1s2]: (e1 in s2) = false .
-- sentence to be proved
eq iStep = true .
}
[RD-]=> :goal{2}
[e=e1]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "2-1".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "2-2".
(consumed 0.0019 sec, including 47 rewrites + 484 matches)
** All goals are successfully discharged.
root*
[e1s2] 1*
[e=e1] 1-1*
[e=e1] 1-2*
[e1s2] 2*
[e=e1] 2-1*
[e=e1] 2-2*==> root*
-- context module: #Goal-root
-- targeted sentence:
eq iStep = true .
[e1s2] 1*
-- context module: #Goal-1
-- assumption
eq [e1s2]: (e1 in s2) = true .
-- targeted sentence:
eq iStep = true .
[e=e1] 1-1*
-- context module: #Goal-1-1
-- assumptions
eq [e1s2]: (e1 in s2) = true .
eq [e=e1]: e = e1 .
-- discharged sentence:
eq [RD-]: iStep = true .
[e=e1] 1-2*
-- context module: #Goal-1-2
-- assumptions
eq [e1s2]: (e1 in s2) = true .
eq [e=e1]: (e =e e1) = false .
-- discharged sentence:
eq [RD-]: iStep = true .
[e1s2] 2*
-- context module: #Goal-2
-- assumption
eq [e1s2]: (e1 in s2) = false .
-- targeted sentence:
eq iStep = true .
[e=e1] 2-1*
-- context module: #Goal-2-1
-- assumptions
eq [e1s2]: (e1 in s2) = false .
eq [e=e1]: e = e1 .
-- discharged sentence:
eq [RD-]: iStep = true .
[e=e1] 2-2*
-- context module: #Goal-2-2
-- assumptions
eq [e1s2]: (e1 in s2) = false .
eq [e=e1]: (e =e e1) = false .
-- discharged sentence:
eq [RD-]: iStep = true .
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> check the induction step proposition iStep
--> in module SET^-in^-iStep with specCalc commands (2)
--> ----------------------------------------------------------------
:goal { ** root -----------------------------------------
-- context module: SET^-in^-iStep
-- sentence to be proved
eq iStep = true .
}
** Initial goal (root) is generated. **
e1s2 defined as :csp{eq (e1 in s2) = true . eq (e1 in s2) = false . }
e=e1 defined as :csp{eq e = e1 . eq (e =e e1) = false . }
[RD-]=> :goal{root}
[e1s2]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[e=e1]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1".
[RD-]=> :goal{1-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-2".
[RD-]=> :goal{2}
[e=e1]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "2-1".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "2-2".
(consumed 0.0055 sec, including 118 rewrites + 1525 matches)
** All goals are successfully discharged.
--> ----------------------------------------------------------------
--> QED
--> ----------------------------------------------------------------
--> ****************************************************************
--> 4.9.1 CITP による帰納法の支援
--> ****************************************************************
--> ****************************************************************
--> CITPによる_+_の結合則の証明
--> ****************************************************************
--> ----------------------------------------------------------------
--> Peano style natural numbers
--> ----------------------------------------------------------------
-- defining module! PNAT
--> ----------------------------------------------------------------
--> PNAT with _=_
--> ----------------------------------------------------------------
-- defining module! PNAT=
--> ----------------------------------------------------------------
--> PNAT with plus _+_ operation
--> ----------------------------------------------------------------
-- defining module! PNAT+
--> ================================================================
** Beginning a new proof in PNAT+
:goal { ** root -----------------------------------------
-- context module: PNAT+
-- sentence to be proved
eq [+assoc]: ((X:Nat.PNAT + Y:Nat.PNAT) + Z:Nat.PNAT)
= (X + (Y + Z)) .
}
** Initial goal (root) is generated. **
**> Induction will be conducted on X:Nat
[SI]=> :goal{root}
** Generated 2 goals
[TC]=> :goal{1}
** Generated 1 goal
[RD-]=> :goal{1-1}
[RD-] discharged:
eq [TC INDUCTION-BASE]: (Y@Nat + Z@Nat)
= (Y@Nat + Z@Nat)
[RD-] discharged goal "1-1".
[TC]=> :goal{2}
** Generated 1 goal
[RD-]=> :goal{2-1}
[RD-] discharged:
eq [TC STEP]: (s (X#Nat + (Y@Nat + Z@Nat)))
= (s (X#Nat + (Y@Nat + Z@Nat)))
[RD-] discharged goal "2-1".
(consumed 0.0028 sec, including 8 rewrites + 108 matches)
** All goals are successfully discharged.
--> QED
-->
root*
[SI] 1*
[TC] 1-1*
[SI] 2*
[TC] 2-1*
-->
==> root*
-- context module: #Goal-root
-- targeted sentence:
eq [+assoc]: ((X:Nat.PNAT + Y:Nat.PNAT) + Z:Nat.PNAT)
= (X + (Y + Z)) .
[SI] 1*
-- context module: #Goal-1
-- targeted sentence:
eq [INDUCTION-BASE]: ((0 + Y:Nat.PNAT) + Z:Nat.PNAT)
= (0 + (Y + Z)) .
[TC] 1-1*
-- context module: #Goal-1-1
-- discharged sentence:
eq [RD- TC INDUCTION-BASE]: (Y@Nat + Z@Nat)
= (Y@Nat + Z@Nat) .
[SI] 2*
-- context module: #Goal-2
-- assumption
eq [SI +assoc]: ((X#Nat + Y:Nat.PNAT) + Z:Nat.PNAT)
= (X#Nat + (Y + Z)) .
-- targeted sentence:
eq [STEP]: (((s X#Nat) + Y:Nat.PNAT) + Z:Nat.PNAT)
= ((s X#Nat) + (Y + Z)) .
[TC] 2-1*
-- context module: #Goal-2-1
-- assumption
eq [SI +assoc]: ((X#Nat + Y:Nat.PNAT) + Z:Nat.PNAT)
= (X#Nat + (Y + Z)) .
-- discharged sentence:
eq [RD- TC STEP]: (s (X#Nat + (Y@Nat + Z@Nat)))
= (s (X#Nat + (Y@Nat + Z@Nat))) .
--> ----------------------------------------------------------------
--> ****************************************************************
--> CITPによる反転の分配則の証明
--> ****************************************************************
--> ----------------------------------------------------------------
--> parametrized list (i.e. generic list)
--> ----------------------------------------------------------------
-- defining module! LIST
--> ----------------------------------------------------------------
--> lists with associative append _@_
--> ----------------------------------------------------------------
-- defining module! LIST@a
--> ----------------------------------------------------------------
--> reverse operation on List
--> ----------------------------------------------------------------
-- defining module! LISTrev
--> ================================================================
** Beginning a new proof in LISTrev
:goal { ** root -----------------------------------------
-- context module: LISTrev
-- sentence to be proved
eq [revdis]: rev((L1:List @ L2:List))
= (rev(L2) @ rev(L1)) .
}
** Initial goal (root) is generated. **
**> Induction will be conducted on L1:List
[SI]=> :goal{root}
** Generated 2 goals
[TC]=> :goal{1}
** Generated 1 goal
[RD-]=> :goal{1-1}
[RD-] discharged:
eq [TC INDUCTION-BASE]: rev(L2@List) = rev(L2@List)
[RD-] discharged goal "1-1".
[TC]=> :goal{2}
** Generated 1 goal
[RD-]=> :goal{2-1}
[RD-] discharged:
eq [TC STEP]: ((rev(L2@List) @ rev(L1#List)) @ (L1#Elt | nil))
= (rev(L2@List) @ (rev(L1#List) @ (L1#Elt | nil)))
[RD-] discharged goal "2-1".
(consumed 0.0030 sec, including 9 rewrites + 211 matches)
** All goals are successfully discharged.
--> QED
-->
root*
[SI] 1*
[TC] 1-1*
[SI] 2*
[TC] 2-1*
-->
==> root*
-- context module: #Goal-root
-- targeted sentence:
eq [revdis]: rev((L1:List @ L2:List))
= (rev(L2) @ rev(L1)) .
[SI] 1*
-- context module: #Goal-1
-- targeted sentence:
eq [INDUCTION-BASE]: rev((nil @ L2:List))
= (rev(L2) @ rev(nil)) .
[TC] 1-1*
-- context module: #Goal-1-1
-- discharged sentence:
eq [RD- TC INDUCTION-BASE]: rev(L2@List)
= rev(L2@List) .
[SI] 2*
-- context module: #Goal-2
-- assumption
eq [SI revdis]: rev((L1#List @ L2:List))
= (rev(L2) @ rev(L1#List)) .
-- targeted sentence:
eq [STEP]: rev(((L1#Elt | L1#List) @ L2:List))
= (rev(L2) @ rev((L1#Elt | L1#List))) .
[TC] 2-1*
-- context module: #Goal-2-1
-- assumption
eq [SI revdis]: rev((L1#List @ L2:List))
= (rev(L2) @ rev(L1#List)) .
-- discharged sentence:
eq [RD- TC STEP]: ((rev(L2@List) @ rev(L1#List)) @ (L1#Elt | nil))
= (rev(L2@List) @ (rev(L1#List) @ (L1#Elt | nil))) .
--> ----------------------------------------------------------------
--> ****************************************************************
--> 4.10 証明スコアのモジュール化
--> ****************************************************************
--> ================================================================
--> モジュールSET^で,メンバー述語の集合積への分配則,つまり等式
--> eq[in^]: E:Elt in (S1:Set ^ S2:Set) = E in S1 and E in S2 .
--> が成り立つことを,
--> S1:Setに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> proof goal module
--> ----------------------------------------------------------------
-- defining module SET^-in^-goal
--> ----------------------------------------------------------------
--> induction base module
--> ----------------------------------------------------------------
-- defining module SET^-in^-iBase
--> ================================================================
--> check the induction base
-- reduce in SET^-in^-iBase(X.SET^) : (iBase):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 7 rewrites + 13 matches)
--> true
--> ----------------------------------------------------------------
--> induction step module
--> ----------------------------------------------------------------
-- defining module SET^-in^-iStep-m
--> ================================================================
--> check the induction step
** Beginning a new proof in SET^-in^-iStep-m
:goal { ** root -----------------------------------------
-- context module: SET^-in^-iStep-m
-- sentence to be proved
eq iStep = true .
}
** Initial goal (root) is generated. **
**> initialized the axiom in goal "1"
eq [INIT in^ 3:3]: (E:Elt in (#s1 ^ S2:Set))
= ((E in #s1) and (E in S2))
[INIT]=>
:goal { ** 1 -----------------------------------------
-- context module: SET^-in^-iStep-m
-- introduced axiom
eq [INIT in^ 3:3]: (E:Elt in (#s1 ^ S2:Set))
= ((E in #s1) and (E in S2)) .
-- sentence to be proved
eq iStep = true .
}
e1s2 defined as :csp{eq (#e1 in s2) = true . eq (#e1 in s2) = false . }
e=e1 defined as :csp{eq e = #e1 . eq (e =e #e1) = false . }e1s2 = :csp{eq (#e1 in s2) = true . eq (#e1 in s2) = false . }
e=e1 = :csp{eq e = #e1 . eq (e =e #e1) = false . }
[RD-]=> :goal{1}
[e1s2]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[e=e1]=> :goal{1-1}
** Generated 2 goals
[RD-]=> :goal{1-1-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-1".
[RD-]=> :goal{1-1-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-2".
[RD-]=> :goal{1-2}
[e=e1]=> :goal{1-2}
** Generated 2 goals
[RD-]=> :goal{1-2-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-2-1".
[RD-]=> :goal{1-2-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-2-2".
(consumed 0.0055 sec, including 124 rewrites + 1481 matches)
** All goals are successfully discharged.
--> all goals are dischargedroot*
[INIT] 1*
[e1s2] 1-1*
[e=e1] 1-1-1*
[e=e1] 1-1-2*
[e1s2] 1-2*
[e=e1] 1-2-1*
[e=e1] 1-2-2*==> root*
-- context module: #Goal-root
-- targeted sentence:
eq iStep = true .
[INIT] 1*
-- context module: #Goal-1
-- assumption
eq [INIT in^ 3:3]: (E:Elt in (#s1 ^ S2:Set))
= ((E in #s1) and (E in S2)) .
-- targeted sentence:
eq iStep = true .
[e1s2] 1-1*
-- context module: #Goal-1-1
-- assumptions
eq [INIT in^ 3:3]: (E:Elt in (#s1 ^ S2:Set))
= ((E in #s1) and (E in S2)) .
eq [e1s2]: (#e1 in s2) = true .
-- targeted sentence:
eq iStep = true .
[e=e1] 1-1-1*
-- context module: #Goal-1-1-1
-- assumptions
eq [INIT in^ 3:3]: (E:Elt in (#s1 ^ S2:Set))
= ((E in #s1) and (E in S2)) .
eq [e1s2]: (#e1 in s2) = true .
eq [e=e1]: e = #e1 .
-- discharged sentence:
eq [RD-]: iStep = true .
[e=e1] 1-1-2*
-- context module: #Goal-1-1-2
-- assumptions
eq [INIT in^ 3:3]: (E:Elt in (#s1 ^ S2:Set))
= ((E in #s1) and (E in S2)) .
eq [e1s2]: (#e1 in s2) = true .
eq [e=e1]: (e =e #e1) = false .
-- discharged sentence:
eq [RD-]: iStep = true .
[e1s2] 1-2*
-- context module: #Goal-1-2
-- assumptions
eq [INIT in^ 3:3]: (E:Elt in (#s1 ^ S2:Set))
= ((E in #s1) and (E in S2)) .
eq [e1s2]: (#e1 in s2) = false .
-- targeted sentence:
eq iStep = true .
[e=e1] 1-2-1*
-- context module: #Goal-1-2-1
-- assumptions
eq [INIT in^ 3:3]: (E:Elt in (#s1 ^ S2:Set))
= ((E in #s1) and (E in S2)) .
eq [e1s2]: (#e1 in s2) = false .
eq [e=e1]: e = #e1 .
-- discharged sentence:
eq [RD-]: iStep = true .
[e=e1] 1-2-2*
-- context module: #Goal-1-2-2
-- assumptions
eq [INIT in^ 3:3]: (E:Elt in (#s1 ^ S2:Set))
= ((E in #s1) and (E in S2)) .
eq [e1s2]: (#e1 in s2) = false .
eq [e=e1]: (e =e #e1) = false .
-- discharged sentence:
eq [RD-]: iStep = true .
--> ================================================================
--> QED
--> ================================================================
--> ****************************************************************
--> 4.11 集合積の結合則の証明
--> ****************************************************************
--> ================================================================
--> モジュールSET^で,演算_^_が結合則をみたす,すなわち等式
--> eq[^as]: S1:Set ^ (S2:Set ^ S3:Set) =
--> (S1:Set ^ S2:Set) ^ S3:Set .
--> が成り立つことを,
--> S1:Setに含まれる要素の数に関する帰納法で,証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> proof goal module
--> ----------------------------------------------------------------
-- defining module SET^-^as-goal
--> ----------------------------------------------------------------
--> induction base module
--> ----------------------------------------------------------------
-- defining module SET^-^as-iBase
--> ================================================================
--> check the base
-- reduce in SET^-^as-iBase(X.SET^) : (iBase):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 6 rewrites + 9 matches)
--> true
--> ----------------------------------------------------------------
--> induction step module
--> ----------------------------------------------------------------
-- defining module SET^-^as-iStep
--> ================================================================
--> check the step
** Beginning a new proof in SET^-^as-iStep
:goal { ** root -----------------------------------------
-- context module: SET^-^as-iStep
-- sentence to be proved
eq iStep = true .
}
** Initial goal (root) is generated. **
**> initialized the axiom in goal "1"
eq [INIT ^as 3:3]: (#s1 ^ (S2:Set ^ S3:Set))
= ((#s1 ^ S2) ^ S3)
[INIT]=>
:goal { ** 1 -----------------------------------------
-- context module: SET^-^as-iStep
-- introduced axiom
eq [INIT ^as 3:3]: (#s1 ^ (S2:Set ^ S3:Set))
= ((#s1 ^ S2) ^ S3) .
-- sentence to be proved
eq iStep = true .
}
e1s2 defined as :csp{eq (#e1 in s2) = true . eq (#e1 in s2) = false . }
e1s3 defined as :csp{eq (#e1 in s3) = true . eq (#e1 in s3) = false . }
--> check the step proposition
[RD-]=> :goal{1}
[e1s2]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[e1s3]=> :goal{1-1}
** Generated 2 goals
[RD-]=> :goal{1-1-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-1".
[RD-]=> :goal{1-1-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-2".
[RD-]=> :goal{1-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-2".
[e1s3]=> :goal{1-2}
[RD-]=> :goal{1-2}
(consumed 0.0078 sec, including 81 rewrites + 473 matches)
** All goals are successfully discharged.
--> all goals are dischargedroot*
[INIT] 1*
[e1s2] 1-1*
[e1s3] 1-1-1*
[e1s3] 1-1-2*
[e1s2] 1-2*==> root*
-- context module: #Goal-root
-- targeted sentence:
eq iStep = true .
[INIT] 1*
-- context module: #Goal-1
-- assumption
eq [INIT ^as 3:3]: (#s1 ^ (S2:Set ^ S3:Set))
= ((#s1 ^ S2) ^ S3) .
-- targeted sentence:
eq iStep = true .
[e1s2] 1-1*
-- context module: #Goal-1-1
-- assumptions
eq [INIT ^as 3:3]: (#s1 ^ (S2:Set ^ S3:Set))
= ((#s1 ^ S2) ^ S3) .
eq [e1s2]: (#e1 in s2) = true .
-- targeted sentence:
eq iStep = true .
[e1s3] 1-1-1*
-- context module: #Goal-1-1-1
-- assumptions
eq [INIT ^as 3:3]: (#s1 ^ (S2:Set ^ S3:Set))
= ((#s1 ^ S2) ^ S3) .
eq [e1s2]: (#e1 in s2) = true .
eq [e1s3]: (#e1 in s3) = true .
-- discharged sentence:
eq [RD-]: iStep = true .
[e1s3] 1-1-2*
-- context module: #Goal-1-1-2
-- assumptions
eq [INIT ^as 3:3]: (#s1 ^ (S2:Set ^ S3:Set))
= ((#s1 ^ S2) ^ S3) .
eq [e1s2]: (#e1 in s2) = true .
eq [e1s3]: (#e1 in s3) = false .
-- discharged sentence:
eq [RD-]: iStep = true .
[e1s2] 1-2*
-- context module: #Goal-1-2
-- assumptions
eq [INIT ^as 3:3]: (#s1 ^ (S2:Set ^ S3:Set))
= ((#s1 ^ S2) ^ S3) .
eq [e1s2]: (#e1 in s2) = false .
-- discharged sentence:
eq [RD-]: iStep = true .
--> ================================================================
--> QED
--> ================================================================
--> ****************************************************************
--> 4.12 集合積の可換則と冪等則の証明
--> ****************************************************************
--> ================================================================
--> モジュールSET^で,等式
--> eq[s^es]: S1:Set ^ (E2:Elt S2:Set) =
--> if E2 in S1 then E2 (S1 ^ S2) else (S1 ^ S2) fi .
--> が成り立つことを,
--> S1:Setに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> proof goal module
--> ----------------------------------------------------------------
-- defining module SET^-s^es-goal
--> ----------------------------------------------------------------
--> induction base module
--> ----------------------------------------------------------------
-- defining module SET^-s^es-iBase
--> ================================================================
--> check the base
-- reduce in SET^-s^es-iBase(X.SET^) : (iBase):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 7 rewrites + 13 matches)
--> true
--> ----------------------------------------------------------------
--> induction step module
--> ----------------------------------------------------------------
-- defining module SET^-s^es-iStep
--> ================================================================
--> check the step
** Beginning a new proof in SET^-s^es-iStep
:goal { ** root -----------------------------------------
-- context module: SET^-s^es-iStep
-- sentence to be proved
eq iStep = true .
}
** Initial goal (root) is generated. **
**> initialized the axiom in goal "1"
eq [INIT s^es 3:3]: (#s1 ^ (E2:Elt S2:Set))
= (if (E2 in #s1) then (E2 (#s1 ^ S2)) else (#s1 ^ S2) fi)
e1e2 defined as :csp{eq #e1 = e2 . eq (#e1 =e e2) = false . }
e1s1 defined as :csp{eq (#e1 in #s1) = true . eq (#e1 in #s1) = false . }
e1s2 defined as :csp{eq (#e1 in s2) = true . eq (#e1 in s2) = false . }
e2s1 defined as :csp{eq (e2 in #s1) = true . eq (e2 in #s1) = false . }
e2s2 defined as :csp{eq (e2 in s2) = true . eq (e2 in s2) = false . }
[RD-]=> :goal{1}
[e1e2]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[e1s1]=> :goal{1-1}
** Generated 2 goals
[RD-]=> :goal{1-1-1}
[e1s2]=> :goal{1-1-1}
** Generated 2 goals
[RD-]=> :goal{1-1-1-1}
[e2s1]=> :goal{1-1-1-1}
** Generated 2 goals
[RD-]=> :goal{1-1-1-1-1}
[e2s2]=> :goal{1-1-1-1-1}
** Generated 2 goals
[RD-]=> :goal{1-1-1-1-1-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-1-1-1-1".
[RD-]=> :goal{1-1-1-1-1-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-1-1-1-2".
[RD-]=> :goal{1-1-1-1-2}
[e2s2]=> :goal{1-1-1-1-2}
** Generated 2 goals
[RD-]=> :goal{1-1-1-1-2-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-1-1-2-1".
[RD-]=> :goal{1-1-1-1-2-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-1-1-2-2".
[RD-]=> :goal{1-1-1-2}
[e2s1]=> :goal{1-1-1-2}
** Generated 2 goals
[RD-]=> :goal{1-1-1-2-1}
[e2s2]=> :goal{1-1-1-2-1}
** Generated 2 goals
[RD-]=> :goal{1-1-1-2-1-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-1-2-1-1".
[RD-]=> :goal{1-1-1-2-1-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-1-2-1-2".
[RD-]=> :goal{1-1-1-2-2}
[e2s2]=> :goal{1-1-1-2-2}
** Generated 2 goals
[RD-]=> :goal{1-1-1-2-2-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-1-2-2-1".
[RD-]=> :goal{1-1-1-2-2-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-1-2-2-2".
[RD-]=> :goal{1-1-2}
[e1s2]=> :goal{1-1-2}
** Generated 2 goals
[RD-]=> :goal{1-1-2-1}
[e2s1]=> :goal{1-1-2-1}
** Generated 2 goals
[RD-]=> :goal{1-1-2-1-1}
[e2s2]=> :goal{1-1-2-1-1}
** Generated 2 goals
[RD-]=> :goal{1-1-2-1-1-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-2-1-1-1".
[RD-]=> :goal{1-1-2-1-1-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-2-1-1-2".
[RD-]=> :goal{1-1-2-1-2}
[e2s2]=> :goal{1-1-2-1-2}
** Generated 2 goals
[RD-]=> :goal{1-1-2-1-2-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-2-1-2-1".
[RD-]=> :goal{1-1-2-1-2-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-2-1-2-2".
[RD-]=> :goal{1-1-2-2}
[e2s1]=> :goal{1-1-2-2}
** Generated 2 goals
[RD-]=> :goal{1-1-2-2-1}
[e2s2]=> :goal{1-1-2-2-1}
** Generated 2 goals
[RD-]=> :goal{1-1-2-2-1-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-2-2-1-1".
[RD-]=> :goal{1-1-2-2-1-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-2-2-1-2".
[RD-]=> :goal{1-1-2-2-2}
[e2s2]=> :goal{1-1-2-2-2}
** Generated 2 goals
[RD-]=> :goal{1-1-2-2-2-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-2-2-2-1".
[RD-]=> :goal{1-1-2-2-2-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1-2-2-2-2".
[RD-]=> :goal{1-2}
[e1s1]=> :goal{1-2}
** Generated 2 goals
[RD-]=> :goal{1-2-1}
[e1s2]=> :goal{1-2-1}
** Generated 2 goals
[RD-]=> :goal{1-2-1-1}
[e2s1]=> :goal{1-2-1-1}
** Generated 2 goals
[RD-]=> :goal{1-2-1-1-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-2-1-1-1".
[e2s2]=> :goal{1-2-1-1-1}
[RD-]=> :goal{1-2-1-1-1}
[RD-]=> :goal{1-2-1-1-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-2-1-1-2".
[e2s2]=> :goal{1-2-1-1-2}
[RD-]=> :goal{1-2-1-1-2}
[RD-]=> :goal{1-2-1-2}
[e2s1]=> :goal{1-2-1-2}
** Generated 2 goals
[RD-]=> :goal{1-2-1-2-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-2-1-2-1".
[e2s2]=> :goal{1-2-1-2-1}
[RD-]=> :goal{1-2-1-2-1}
[RD-]=> :goal{1-2-1-2-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-2-1-2-2".
[e2s2]=> :goal{1-2-1-2-2}
[RD-]=> :goal{1-2-1-2-2}
[RD-]=> :goal{1-2-2}
[e1s2]=> :goal{1-2-2}
** Generated 2 goals
[RD-]=> :goal{1-2-2-1}
[e2s1]=> :goal{1-2-2-1}
** Generated 2 goals
[RD-]=> :goal{1-2-2-1-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-2-2-1-1".
[e2s2]=> :goal{1-2-2-1-1}
[RD-]=> :goal{1-2-2-1-1}
[RD-]=> :goal{1-2-2-1-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-2-2-1-2".
[e2s2]=> :goal{1-2-2-1-2}
[RD-]=> :goal{1-2-2-1-2}
[RD-]=> :goal{1-2-2-2}
[e2s1]=> :goal{1-2-2-2}
** Generated 2 goals
[RD-]=> :goal{1-2-2-2-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-2-2-2-1".
[e2s2]=> :goal{1-2-2-2-1}
[RD-]=> :goal{1-2-2-2-1}
[RD-]=> :goal{1-2-2-2-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-2-2-2-2".
[e2s2]=> :goal{1-2-2-2-2}
[RD-]=> :goal{1-2-2-2-2}
(consumed 0.0409 sec, including 1294 rewrites + 6638 matches)
** All goals are successfully discharged.
--> all goal are discharged
--> ================================================================
--> QED
--> ================================================================
--> ****************************************************************
--> 練習問題4.4[SET^の証明スコア]の解答例
--> ****************************************************************
--> ****************************************************************
--> (1)の解答
--> ****************************************************************
--> ================================================================
--> モジュールSET^で,emptyは演算_^_の右単位元である,つまり,等式
--> eq[^emp]: S1:Set ^ empty = empty .
--> が成り立つことを,
--> S1:Setに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ================================================================
--> (1) モジュール化無し
--> ================================================================
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
--> check the base
-- reduce in SET^(X) : ((empty ^ empty) =s empty):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 2 matches)
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- opening module SET^(X)
--> check the step
-- reduce in %SET^(X) : (((#e #s1) ^ empty) =s empty):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 13 matches)
--> ================================================================
--> QED
--> ================================================================
--> ================================================================
--> (2) モジュール化有り
--> ================================================================
--> ----------------------------------------------------------------
--> module defining proof goal
--> ----------------------------------------------------------------
-- defining module SET^-^em-goal
--> ----------------------------------------------------------------
--> module for induction base
--> ----------------------------------------------------------------
-- defining module SET^-^em-iBase
--> ================================================================
--> check the base
-- reduce in SET^-^em-iBase(X.SET^) : (iBase):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 4 matches)
--> true
--> ----------------------------------------------------------------
--> module for induction step
--> ----------------------------------------------------------------
-- defining module SET^-^em-iStep
--> ================================================================
--> check the step
** Beginning a new proof in SET^-^em-iStep
:goal { ** root -----------------------------------------
-- context module: SET^-^em-iStep
-- sentence to be proved
eq iStep = true .
}
** Initial goal (root) is generated. **
**> initialized the axiom in goal "1"
eq [INIT ^em 3:3]: (#s1 ^ empty) = empty
--> check the step proposition
-- reduce in #Goal-1(X.SET^) : (iStep):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 7 rewrites + 15 matches)
--> true
--> ================================================================
--> QED
--> ================================================================
--> ****************************************************************
--> (2)の解答
--> ****************************************************************
--> ================================================================
--> モジュールSET^で,集合積が可換則を満たす,つまり等式
--> eq[^com]: S1:Set ^ S2:Set = S2 ^ S1 .
--> が成立することを,
--> S1:Setに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> proof goal module
--> ----------------------------------------------------------------
-- defining module SET^-^cm-goal
--> ----------------------------------------------------------------
--> induction base module
--> ----------------------------------------------------------------
-- defining module SET^-^cm-iBase
--> ================================================================
--> check the base
-- reduce in SET^-^cm-iBase(X.SET^) : (iBase):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 6 matches)
--> true
--> ----------------------------------------------------------------
--> induction step module
--> ----------------------------------------------------------------
-- defining module SET^-^cm-iStep
--> ================================================================
--> check the step
** Beginning a new proof in SET^-^cm-iStep
:goal { ** root -----------------------------------------
-- context module: SET^-^cm-iStep
-- sentence to be proved
eq iStep = true .
}
** Initial goal (root) is generated. **
**> initialized the axiom in goal "1"
eq [INIT ^cm 3:3]: (#s1 ^ S2:Set) = (S2 ^ #s1)
e1s2 defined as :csp{eq (#e1 in s2) = true . eq (#e1 in s2) = false . }
--> check the step
[e1s2]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-1".
[RD-]=> :goal{1-2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1-2".
(consumed 0.0015 sec, including 22 rewrites + 80 matches)
** All goals are successfully discharged.
--> ================================================================
--> QED
--> ================================================================
--> ****************************************************************
--> (3)の解答
--> ****************************************************************
--> ================================================================
--> モジュールSET^で,演算_^_が冪等則を満たす,つまり等式
--> eq[^idem]: S:Set ^ S = S .
--> が成り立つことを,
--> S:Setに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> induction base
--> ----------------------------------------------------------------
--> ================================================================
--> check the base
-- reduce in SET^(X) : ((empty ^ empty) =s empty):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 2 rewrites + 2 matches)
--> ----------------------------------------------------------------
--> induction step
--> ----------------------------------------------------------------
-- defining module SET^idem-iStep
--> ================================================================
--> check the step
** Beginning a new proof in SET^idem-iStep
:goal { ** root -----------------------------------------
-- context module: SET^idem-iStep
-- sentence to be proved
eq iStep = true .
}
** Initial goal (root) is generated. **
eins defined as :csp{eq (#e in #s) = true . eq (#e in #s) = false . }
[RD-]=> :goal{root}
[eins]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "1".
[RD-]=> :goal{2}
[RD-] discharged:
eq iStep = true
[RD-] discharged goal "2".
(consumed 0.0018 sec, including 46 rewrites + 247 matches)
** All goals are successfully discharged.
--> ================================================================
--> QED
--> ================================================================
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 4.13 集合の等価性
--> ****************************************************************
--> ----------------------------------------------------------------
--> SET=s -- 等価性述語_=s_を精密化したSET
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> SET,SETin,SET=sの基本テスト
--> ----------------------------------------------------------------
-- opening module SET(X <= NAT)
-- reduce in %SET(X <= NAT) : (1 = empty):Bool
(1 = empty):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 2 matches)
--> (1 = empty)
-- reduce in %SET(X <= NAT) : (1 = 1):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
--> true
-- reduce in %SET(X <= NAT) : (1 = (2 3)):Bool
(1 = (2 3)):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 7 matches)
--> (1 = (2 3))
-- reduce in %SET(X <= NAT) : ((1 (2 3)) = (3 (2 (2 (3 1))))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 9 rewrites + 55 matches)
--> true
-- opening module SETin(X <= NAT{op E1:Elt =e E2:Elt -> E1:Nat = E2:Nat })
-- reduce in %SETin(X <= NAT{ ... }) : (1 =s empty):Bool
(1 =s empty):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 1 matches)
--> (1 =s empty)
-- reduce in %SETin(X <= NAT{ ... }) : (1 =s 1):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
--> true
-- reduce in %SETin(X <= NAT{ ... }) : (1 =s (2 3)):Bool
(1 =s (2 3)):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 6 matches)
--> (1 =s (2 3))
-- reduce in %SETin(X <= NAT{ ... }) : ((1 (2 3)) =s (3 (2 (2 (3 1))))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 9 rewrites + 55 matches)
--> true
-- opening module SETin(X <= NAT{op E1:Elt =e E2:Elt -> E1:Nat == E2:Nat })
-- reduce in %SETin(X <= NAT{ ... }) : (1 =s empty):Bool
(1 =s empty):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 1 matches)
--> (1 =s empty)
-- reduce in %SETin(X <= NAT{ ... }) : (1 =s 1):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 1 rewrites + 1 matches)
--> true
-- reduce in %SETin(X <= NAT{ ... }) : (1 =s (2 3)):Bool
(1 =s (2 3)):Bool
(0.0000 sec for parse, 0.0000 sec for 0 rewrites + 6 matches)
--> (1 =s (2 3))
-- reduce in %SETin(X <= NAT{ ... }) : ((1 (2 3)) =s (3 (2 (2 (3 1))))):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 9 rewrites + 55 matches)
--> true
-- opening module SET=s(X <= NAT{op E1:Elt =e E2:Elt -> E1:Nat = E2:Nat })
-- reduce in %SET=s(X <= NAT{ ... }) : (1 =s empty):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 7 rewrites + 10 matches)
--> false
-- reduce in %SET=s(X <= NAT{ ... }) : (1 =s 1):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 6 matches)
--> true
-- reduce in %SET=s(X <= NAT{ ... }) : (1 =s (2 3)):Bool
((2 = 1) and (1 = 3)):Bool
(0.0000 sec for parse, 0.0002 sec for 26 rewrites + 271 matches)
--> ((2 = 1) and (1 = 3))
-- reduce in %SET=s(X <= NAT{ ... }) : ((1 (2 3)) =s (3 (2 (2 (3 1))))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 12 rewrites + 80 matches)
--> true
-- opening module SET=s(X <= NAT{op E1:Elt =e E2:Elt -> E1:Nat == E2:Nat })
-- reduce in %SET=s(X <= NAT{ ... }) : (1 =s empty):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 7 rewrites + 10 matches)
--> false
-- reduce in %SET=s(X <= NAT{ ... }) : (1 =s 1):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 4 rewrites + 6 matches)
--> true
-- reduce in %SET=s(X <= NAT{ ... }) : (1 =s (2 3)):Bool
(false):Bool
(0.0000 sec for parse, 0.0000 sec for 25 rewrites + 52 matches)
--> false
-- reduce in %SET=s(X <= NAT{ ... }) : ((1 (2 3)) =s (3 (2 (2 (3 1))))):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 12 rewrites + 80 matches)
--> true
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ****************************************************************
SET^idem-iStep(X.SET^)> [Leaving CafeOBJ]
========================================
Running: chap5.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:11 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/chap5.cafe
--> ****************************************************************
--> 5 遷移システムの仕様と検証
--> ****************************************************************
--> ****************************************************************
--> ################################################################
--> requireとprovideによるCafeOBJファイル群の構造化
--> ################################################################
--> ################################################################
--> ****************************************************************
--> 5.1 相互排除プロトコル QLOCK
--> ****************************************************************
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-tr-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 待ち行列の最後に入る状態遷移 (WT: want transition)
--> ----------------------------------------------------------------
-- defining module! WTtr
-- reading in file : rwl
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/rwl.cafe
-- defining module! RWL
-- done reading in file: rwl
--> ----------------------------------------------------------------
--> 待ち行列の先頭にきたら共有資源を使う状態遷移 (TY: try transition)
--> ----------------------------------------------------------------
-- defining module! TYtr
--> ----------------------------------------------------------------
--> 共有資源を使い終わったら待ち行列を離れる状態遷移 (EX: exit transition)
--> ----------------------------------------------------------------
-- defining module! EXtr
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ****************************************************************
--> 5.3 検索述語によるシミュレーション
--> ****************************************************************
processing input : ./qlock-ex-tr-sys.cafe
--> ****************************************************************
--> 5.4 検索述語による反例発見
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> want transition; arbitrary position but the top
--> ----------------------------------------------------------------
-- defining module! WTATtr
--> ----------------------------------------------------------------
--> want transition; arbitrary position
--> ----------------------------------------------------------------
-- defining module! WTAtr
--> ----------------------------------------------------------------
--> swap the position but the top
--> ----------------------------------------------------------------
-- defining module! SWPTtr
--> ----------------------------------------------------------------
--> swap the position
--> ----------------------------------------------------------------
-- defining module! SWPtr
--> ----------------------------------------------------------------
--> drop out from the queue
--> ----------------------------------------------------------------
-- defining module! DPtr
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-mx-inv-prp.cafe
--> ****************************************************************
--> 5.3 検索述語によるシミュレーション
--> 5.5 遷移システムの不変特性と帰納不変特性
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 相互排除性述語(ゴール述語)mx_:共用資源を使用中の実行主体はたかだか一つ
--> ----------------------------------------------------------------
-- defining module! MXprp
--> ----------------------------------------------------------------
--> hq=c_:共用資源を使用中であるであればキューの先頭要素である
--> ----------------------------------------------------------------
-- defining module! HQ=Cprp
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-ex-tr-ss.cafe
--> ****************************************************************
--> 5.3 検索述語によるシミュレーション
--> 5.4 検索述語による反例発見
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体が自然数で表され遷移規則wt,ty,exで遷移するシステムをオープン
--> ----------------------------------------------------------------
-- reading in file : nat
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/nat.cafe
-- defining module! NAT
-- reading in file : nznat
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/nznat.cafe
-- defining module! NZNAT
-- done reading in file: nznat
-- done reading in file: nat
-- opening module WTtr + TYtr + EXtr(X <= NAT{sort Aid -> Nat, op A1:Aid =a A2:Aid -> A1:Nat == A2:Nat })
--> ================================================================
--> 2つの実行主体を持つシステムが到達可能な全ての状態
--> ----------------------------------------------------------------
-- reduce in %WTtr + TYtr + EXtr(X <= NAT{ ... }) : (([ nilQ r (1 2) w empS c empS ]) = ( * , * ) =>* S:State):Bool
** Found [state 0-0] ([ nilQ r (2 1) w empS c empS ]):State
-- target: S:State
{ S:State |-> ([ nilQ r (2 1) w empS c empS ]) }
** Found [state 0-1] ([ 2 r 1 w 2 c empS ]):State
-- target: S:State
{ S:State |-> ([ 2 r 1 w 2 c empS ]), Sr:As |-> 1, Ar:Nat |-> 2, Q:Aq |-> nilQ, Sc:As |-> empS, Sw:As |-> empS }
** Found [state 0-2] ([ 1 r 2 w 1 c empS ]):State
-- target: S:State
{ S:State |-> ([ 1 r 2 w 1 c empS ]), Sr:As |-> 2, Ar:Nat |-> 1, Q:Aq |-> nilQ, Sc:As |-> empS, Sw:As |-> empS }
** Found [state 0-3] ([ (2 | 1) r empS w (2 1) c empS ]):State
-- target: S:State
{ S:State |-> ([ (2 | 1) r empS w (2 1) c empS ]), Sr:As |-> empS, Ar:Nat |-> 1, Q:Aq |-> 2, Sc:As |-> empS, Sw:As |-> 2 }
** Found [state 0-4] ([ 2 r 1 w empS c 2 ]):State
-- target: S:State
{ S:State |-> ([ 2 r 1 w empS c 2 ]), Sw:As |-> empS, A:Nat |-> 2, Q:Aq |-> nilQ, Sr:As |-> 1, Sc:As |-> empS }
** Found [state 0-5] ([ (1 | 2) r empS w (1 2) c empS ]):State
-- target: S:State
{ S:State |-> ([ (1 | 2) r empS w (1 2) c empS ]), Sr:As |-> empS, Ar:Nat |-> 2, Q:Aq |-> 1, Sc:As |-> empS, Sw:As |-> 1 }
** Found [state 0-6] ([ 1 r 2 w empS c 1 ]):State
-- target: S:State
{ S:State |-> ([ 1 r 2 w empS c 1 ]), Sw:As |-> empS, A:Nat |-> 1, Q:Aq |-> nilQ, Sr:As |-> 2, Sc:As |-> empS }
** Found [state 0-7] ([ (2 | 1) r empS w 1 c 2 ]):State
-- target: S:State
{ S:State |-> ([ (2 | 1) r empS w 1 c 2 ]), Sw:As |-> 1, A:Nat |-> 2, Q:Aq |-> 1, Sr:As |-> empS, Sc:As |-> empS }
** Found [state 0-8] ([ (1 | 2) r empS w 2 c 1 ]):State
-- target: S:State
{ S:State |-> ([ (1 | 2) r empS w 2 c 1 ]), Sw:As |-> 2, A:Nat |-> 1, Q:Aq |-> 2, Sr:As |-> empS, Sc:As |-> empS }
** No more possible transitions.
(true):Bool
(0.0001 sec for parse, 0.0010 sec for 63 rewrites + 180 matches, 18 memo hits)
--> ================================================================
--> 3つの実行主体を持つシステムが到達可能な全ての状態
--> ----------------------------------------------------------------
-- reduce in %WTtr + TYtr + EXtr(X <= NAT{ ... }) : (([ nilQ r (1 (2 3)) w empS c empS ]) = ( * , * ) =>* S:State):Bool
** Found [state 0-0] ([ nilQ r (2 (3 1)) w empS c empS ]):State
-- target: S:State
{ S:State |-> ([ nilQ r (2 (3 1)) w empS c empS ]) }
** Found [state 0-1] ([ 2 r (1 3) w 2 c empS ]):State
-- target: S:State
{ S:State |-> ([ 2 r (1 3) w 2 c empS ]), Sr:As |-> (1 3), Ar:Nat |-> 2, Q:Aq |-> nilQ, Sc:As |-> empS, Sw:As |-> empS }
** Found [state 0-2] ([ 3 r (1 2) w 3 c empS ]):State
-- target: S:State
{ S:State |-> ([ 3 r (1 2) w 3 c empS ]), Sr:As |-> (1 2), Ar:Nat |-> 3, Q:Aq |-> nilQ, Sc:As |-> empS, Sw:As |-> empS }
** Found [state 0-3] ([ 1 r (3 2) w 1 c empS ]):State
-- target: S:State
{ S:State |-> ([ 1 r (3 2) w 1 c empS ]), Sr:As |-> (3 2), Ar:Nat |-> 1, Q:Aq |-> nilQ, Sc:As |-> empS, Sw:As |-> empS }
** Found [state 0-4] ([ (2 | 1) r 3 w (2 1) c empS ]):State
-- target: S:State
{ S:State |-> ([ (2 | 1) r 3 w (2 1) c empS ]), Sr:As |-> 3, Ar:Nat |-> 1, Q:Aq |-> 2, Sc:As |-> empS, Sw:As |-> 2 }
** Found [state 0-5] ([ (2 | 3) r 1 w (2 3) c empS ]):State
-- target: S:State
{ S:State |-> ([ (2 | 3) r 1 w (2 3) c empS ]), Sr:As |-> 1, Ar:Nat |-> 3, Q:Aq |-> 2, Sc:As |-> empS, Sw:As |-> 2 }
** Found [state 0-6] ([ 2 r (3 1) w empS c 2 ]):State
-- target: S:State
{ S:State |-> ([ 2 r (3 1) w empS c 2 ]), Sw:As |-> empS, A:Nat |-> 2, Q:Aq |-> nilQ, Sr:As |-> (3 1), Sc:As |-> empS }
** Found [state 0-7] ([ (3 | 1) r 2 w (3 1) c empS ]):State
-- target: S:State
{ S:State |-> ([ (3 | 1) r 2 w (3 1) c empS ]), Sr:As |-> 2, Ar:Nat |-> 1, Q:Aq |-> 3, Sc:As |-> empS, Sw:As |-> 3 }
** Found [state 0-8] ([ (3 | 2) r 1 w (3 2) c empS ]):State
-- target: S:State
{ S:State |-> ([ (3 | 2) r 1 w (3 2) c empS ]), Sr:As |-> 1, Ar:Nat |-> 2, Q:Aq |-> 3, Sc:As |-> empS, Sw:As |-> 3 }
** Found [state 0-9] ([ 3 r (2 1) w empS c 3 ]):State
-- target: S:State
{ S:State |-> ([ 3 r (2 1) w empS c 3 ]), Sw:As |-> empS, A:Nat |-> 3, Q:Aq |-> nilQ, Sr:As |-> (2 1), Sc:As |-> empS }
** Found [state 0-10] ([ (1 | 3) r 2 w (1 3) c empS ]):State
-- target: S:State
{ S:State |-> ([ (1 | 3) r 2 w (1 3) c empS ]), Sr:As |-> 2, Ar:Nat |-> 3, Q:Aq |-> 1, Sc:As |-> empS, Sw:As |-> 1 }
** Found [state 0-11] ([ (1 | 2) r 3 w (1 2) c empS ]):State
-- target: S:State
{ S:State |-> ([ (1 | 2) r 3 w (1 2) c empS ]), Sr:As |-> 3, Ar:Nat |-> 2, Q:Aq |-> 1, Sc:As |-> empS, Sw:As |-> 1 }
** Found [state 0-12] ([ 1 r (2 3) w empS c 1 ]):State
-- target: S:State
{ S:State |-> ([ 1 r (2 3) w empS c 1 ]), Sw:As |-> empS, A:Nat |-> 1, Q:Aq |-> nilQ, Sr:As |-> (2 3), Sc:As |-> empS }
** Found [state 0-13] ([ ((2 | 1) | 3) r empS w (2 (1 3)) c empS ]):State
-- target: S:State
{ S:State |-> ([ ((2 | 1) | 3) r empS w (2 (1 3)) c empS ]), Sr:As |-> empS, Ar:Nat |-> 3, Q:Aq |-> (2 | 1), Sc:As |-> empS, Sw:As |-> (1 2) }
** Found [state 0-14] ([ (2 | 1) r 3 w 1 c 2 ]):State
-- target: S:State
{ S:State |-> ([ (2 | 1) r 3 w 1 c 2 ]), Sw:As |-> 1, A:Nat |-> 2, Q:Aq |-> 1, Sr:As |-> 3, Sc:As |-> empS }
** Found [state 0-15] ([ ((2 | 3) | 1) r empS w (2 (3 1)) c empS ]):State
-- target: S:State
{ S:State |-> ([ ((2 | 3) | 1) r empS w (2 (3 1)) c empS ]), Sr:As |-> empS, Ar:Nat |-> 1, Q:Aq |-> (2 | 3), Sc:As |-> empS, Sw:As |-> (3 2) }
** Found [state 0-16] ([ (2 | 3) r 1 w 3 c 2 ]):State
-- target: S:State
{ S:State |-> ([ (2 | 3) r 1 w 3 c 2 ]), Sw:As |-> 3, A:Nat |-> 2, Q:Aq |-> 3, Sr:As |-> 1, Sc:As |-> empS }
** Found [state 0-17] ([ ((3 | 1) | 2) r empS w (3 (1 2)) c empS ]):State
-- target: S:State
{ S:State |-> ([ ((3 | 1) | 2) r empS w (3 (1 2)) c empS ]), Sr:As |-> empS, Ar:Nat |-> 2, Q:Aq |-> (3 | 1), Sc:As |-> empS, Sw:As |-> (1 3) }
** Found [state 0-18] ([ (3 | 1) r 2 w 1 c 3 ]):State
-- target: S:State
{ S:State |-> ([ (3 | 1) r 2 w 1 c 3 ]), Sw:As |-> 1, A:Nat |-> 3, Q:Aq |-> 1, Sr:As |-> 2, Sc:As |-> empS }
** Found [state 0-19] ([ ((3 | 2) | 1) r empS w (3 (2 1)) c empS ]):State
-- target: S:State
{ S:State |-> ([ ((3 | 2) | 1) r empS w (3 (2 1)) c empS ]), Sr:As |-> empS, Ar:Nat |-> 1, Q:Aq |-> (3 | 2), Sc:As |-> empS, Sw:As |-> (2 3) }
** Found [state 0-20] ([ (3 | 2) r 1 w 2 c 3 ]):State
-- target: S:State
{ S:State |-> ([ (3 | 2) r 1 w 2 c 3 ]), Sw:As |-> 2, A:Nat |-> 3, Q:Aq |-> 2, Sr:As |-> 1, Sc:As |-> empS }
** Found [state 0-21] ([ ((1 | 3) | 2) r empS w (1 (3 2)) c empS ]):State
-- target: S:State
{ S:State |-> ([ ((1 | 3) | 2) r empS w (1 (3 2)) c empS ]), Sr:As |-> empS, Ar:Nat |-> 2, Q:Aq |-> (1 | 3), Sc:As |-> empS, Sw:As |-> (3 1) }
** Found [state 0-22] ([ (1 | 3) r 2 w 3 c 1 ]):State
-- target: S:State
{ S:State |-> ([ (1 | 3) r 2 w 3 c 1 ]), Sw:As |-> 3, A:Nat |-> 1, Q:Aq |-> 3, Sr:As |-> 2, Sc:As |-> empS }
** Found [state 0-23] ([ ((1 | 2) | 3) r empS w (1 (2 3)) c empS ]):State
-- target: S:State
{ S:State |-> ([ ((1 | 2) | 3) r empS w (1 (2 3)) c empS ]), Sr:As |-> empS, Ar:Nat |-> 3, Q:Aq |-> (1 | 2), Sc:As |-> empS, Sw:As |-> (2 1) }
** Found [state 0-24] ([ (1 | 2) r 3 w 2 c 1 ]):State
-- target: S:State
{ S:State |-> ([ (1 | 2) r 3 w 2 c 1 ]), Sw:As |-> 2, A:Nat |-> 1, Q:Aq |-> 2, Sr:As |-> 3, Sc:As |-> empS }
** Found [state 0-25] ([ (2 | (1 | 3)) r empS w (3 1) c 2 ]):State
-- target: S:State
{ S:State |-> ([ (2 | (1 | 3)) r empS w (3 1) c 2 ]), Sw:As |-> (3 1), A:Nat |-> 2, Q:Aq |-> (1 | 3), Sr:As |-> empS, Sc:As |-> empS }
** Found [state 0-26] ([ (2 | (3 | 1)) r empS w (1 3) c 2 ]):State
-- target: S:State
{ S:State |-> ([ (2 | (3 | 1)) r empS w (1 3) c 2 ]), Sw:As |-> (1 3), A:Nat |-> 2, Q:Aq |-> (3 | 1), Sr:As |-> empS, Sc:As |-> empS }
** Found [state 0-27] ([ (3 | (1 | 2)) r empS w (2 1) c 3 ]):State
-- target: S:State
{ S:State |-> ([ (3 | (1 | 2)) r empS w (2 1) c 3 ]), Sw:As |-> (2 1), A:Nat |-> 3, Q:Aq |-> (1 | 2), Sr:As |-> empS, Sc:As |-> empS }
** Found [state 0-28] ([ (3 | (2 | 1)) r empS w (1 2) c 3 ]):State
-- target: S:State
{ S:State |-> ([ (3 | (2 | 1)) r empS w (1 2) c 3 ]), Sw:As |-> (1 2), A:Nat |-> 3, Q:Aq |-> (2 | 1), Sr:As |-> empS, Sc:As |-> empS }
** Found [state 0-29] ([ (1 | (3 | 2)) r empS w (2 3) c 1 ]):State
-- target: S:State
{ S:State |-> ([ (1 | (3 | 2)) r empS w (2 3) c 1 ]), Sw:As |-> (2 3), A:Nat |-> 1, Q:Aq |-> (3 | 2), Sr:As |-> empS, Sc:As |-> empS }
** Found [state 0-30] ([ (1 | (2 | 3)) r empS w (3 2) c 1 ]):State
-- target: S:State
{ S:State |-> ([ (1 | (2 | 3)) r empS w (3 2) c 1 ]), Sw:As |-> (3 2), A:Nat |-> 1, Q:Aq |-> (2 | 3), Sr:As |-> empS, Sc:As |-> empS }
** No more possible transitions.
(true):Bool
(0.0001 sec for parse, 0.0039 sec for 190 rewrites + 1280 matches, 51 memo hits)
--> ================================================================
--> 4つの実行主体を持つシステムが到達可能な全ての状態
--> ----------------------------------------------------------------
--> 129状態
--> ================================================================
--> 5つの実行主体を持つシステムが到達可能な全ての状態
--> ----------------------------------------------------------------
--> 651状態
--> ================================================================
--> 相互排除性が成り立たない
--> 遷移規則wt,ty,exにより到達可能な状態の検索
--> ----------------------------------------------------------------
-- opening module WTtr + TYtr + MXprp + EXtr(X <= NAT{sort Aid -> Nat, op A1:Aid =a A2:Aid -> A1:Nat == A2:Nat })
-- reduce in %WTtr + TYtr + MXprp + EXtr(X <= NAT{ ... }) : (([ nilQ r (1 2) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** No more possible transitions.
(false):Bool
(0.0001 sec for parse, 0.0009 sec for 103 rewrites + 271 matches, 18 memo hits)
-- reduce in %WTtr + TYtr + MXprp + EXtr(X <= NAT{ ... }) : (([ nilQ r (1 (2 3)) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** No more possible transitions.
(false):Bool
(0.0001 sec for parse, 0.0036 sec for 329 rewrites + 1882 matches, 51 memo hits)
-- reduce in %WTtr + TYtr + MXprp + EXtr(X <= NAT{ ... }) : (([ nilQ r (4 (3 (1 2))) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** No more possible transitions.
(false):Bool
(0.0001 sec for parse, 0.0214 sec for 1305 rewrites + 15553 matches, 188 memo hits)
-- reduce in %WTtr + TYtr + MXprp + EXtr(X <= NAT{ ... }) : (([ nilQ r (3 (2 (4 (1 5)))) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** No more possible transitions.
(false):Bool
(0.0001 sec for parse, 0.1702 sec for 6465 rewrites + 147515 matches, 905 memo hits)
--> ================================================================
--> 相互排除性が成り立たない
--> 遷移規則wt,ty,ex,wtat,swpt,dpにより到達可能な状態の検索
--> ----------------------------------------------------------------
-- opening module WTtr + WTATtr + TYtr + SWPTtr + MXprp + EXtr + DPtr(X <= NAT{sort Aid -> Nat, op A1:Aid =a A2:Aid -> A1:Nat == A2:Nat })
-- reduce in %WTtr + WTATtr + TYtr + SWPTtr + MXprp + EXtr + DPtr(X <= NAT{ ... }) : (([ nilQ r (1 2) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** No more possible transitions.
(false):Bool
(0.0001 sec for parse, 0.0012 sec for 259 rewrites + 683 matches, 50 memo hits)
-- reduce in %WTtr + WTATtr + TYtr + SWPTtr + MXprp + EXtr + DPtr(X <= NAT{ ... }) : (([ nilQ r (1 (2 3)) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** No more possible transitions.
(false):Bool
(0.0001 sec for parse, 0.0059 sec for 1043 rewrites + 5032 matches, 195 memo hits)
-- reduce in %WTtr + WTATtr + TYtr + SWPTtr + MXprp + EXtr + DPtr(X <= NAT{ ... }) : (([ nilQ r (4 (3 (1 2))) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** No more possible transitions.
(false):Bool
(0.0001 sec for parse, 0.0492 sec for 5329 rewrites + 50105 matches, 1020 memo hits)
-- reduce in %WTtr + WTATtr + TYtr + SWPTtr + MXprp + EXtr + DPtr(X <= NAT{ ... }) : (([ nilQ r (3 (2 (4 (1 5)))) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** No more possible transitions.
(false):Bool
(0.0001 sec for parse, 0.5204 sec for 32995 rewrites + 597885 matches, 6485 memo hits)
--> ================================================================
--> 相互排除性が成り立たない
--> 遷移規則wt,ty,ex,wtaにより到達可能な状態の検索
--> ----------------------------------------------------------------
-- opening module WTtr + WTAtr + TYtr + MXprp + EXtr(X <= NAT{sort Aid -> Nat, op A1:Aid =a A2:Aid -> A1:Nat == A2:Nat })
-- reduce in %WTtr + WTAtr + TYtr + MXprp + EXtr(X <= NAT{ ... }) : (([ nilQ r (1 2) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** Found [state 0-11] ([ (1 | 2) r empS w empS c (2 1) ]):State
-- target: S:State
{ S:State |-> ([ (1 | 2) r empS w empS c (2 1) ]), Sw:As |-> empS, A:Nat |-> 1, Q:Aq |-> 2, Sr:As |-> empS, Sc:As |-> 2 }
** Found [state 0-12] ([ (2 | 1) r empS w empS c (1 2) ]):State
-- target: S:State
{ S:State |-> ([ (2 | 1) r empS w empS c (1 2) ]), Sw:As |-> empS, A:Nat |-> 2, Q:Aq |-> 1, Sr:As |-> empS, Sc:As |-> 1 }
** No more possible transitions.
(true):Bool
(0.0001 sec for parse, 0.0014 sec for 185 rewrites + 645 matches, 40 memo hits)
--> ================================================================
--> 相互排除性が成り立たない
--> 遷移規則wt,ty,ex,swpにより到達可能な状態の検索
--> ----------------------------------------------------------------
-- opening module WTtr + TYtr + SWPtr + MXprp + EXtr(X <= NAT{sort Aid -> Nat, op A1:Aid =a A2:Aid -> A1:Nat == A2:Nat })
-- reduce in %WTtr + TYtr + SWPtr + MXprp + EXtr(X <= NAT{ ... }) : (([ nilQ r (1 2) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** No more possible transitions.
(false):Bool
(0.0001 sec for parse, 0.0008 sec for 103 rewrites + 271 matches, 18 memo hits)
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ****************************************************************
--> 5.4 検索述語による反例発見
--> ****************************************************************
--> ****************************************************************
--> 5.5 遷移システムの不変特性と帰納不変特性
--> ****************************************************************
processing input : ./qlock-init-prp.cafe
--> ****************************************************************
--> 5.5 遷移システムの不変特性と帰納不変特性
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 初期状態述語
--> ----------------------------------------------------------------
-- defining module! INITprp
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ****************************************************************
--> 5.6 初期状態条件の証明スコア
--> ****************************************************************
processing input : ./qlock-mx-init-ps.cafe
--> ****************************************************************
--> 5.6 初期状態条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 初期状態条件
--> ----------------------------------------------------------------
-- defining module INITcheck-mx
--> ================================================================
--> check (initCheck = true) 1
--> ----------------------------------------------------------------
** Beginning a new proof in INITcheck-mx
-- reading in file : int
-- done reading in file: int
:goal { ** root -----------------------------------------
-- context module: INITcheck-mx
-- sentence to be proved
eq initCheck = true .
}
** Initial goal (root) is generated. **
q=nil defined as :csp{eq q = nilQ . eq q = (a1 | q1) . }
sc=em defined as :csp{eq sc = empS . eq sc = (ac1 sc1) . }
[q=nil]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[sc=em]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-1".
[RD-]=> :goal{1-2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-2".
[RD-]=> :goal{2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "2".
[sc=em]=> :goal{2}
[RD-]=> :goal{2}
(consumed 0.0051 sec, including 197 rewrites + 1516 matches)
** All goals are successfully discharged.
**> QED *** INITcheck-mx * 1
--> ================================================================
--> ================================================================
--> check (initCheck = true) 2
--> ----------------------------------------------------------------
--> 1-1
-- opening module INITcheck-mx(X.STATE)
-- reduce in %INITcheck-mx(X.STATE) : (initCheck):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 37 rewrites + 126 matches)
--> 1-2
-- opening module INITcheck-mx(X.STATE)
-- reduce in %INITcheck-mx(X.STATE) : (initCheck):Bool
(true):Bool
(0.0000 sec for parse, 0.0003 sec for 60 rewrites + 502 matches)
--> 2
-- opening module INITcheck-mx(X.STATE)
-- reduce in %INITcheck-mx(X.STATE) : (initCheck):Bool
(true):Bool
(0.0000 sec for parse, 0.0002 sec for 35 rewrites + 398 matches)
**> QED *** INITcheck-mx * 2
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ****************************************************************
--> 5.7 検索述語による遷移の検索
--> ****************************************************************
processing input : ./check-cnr.cafe
--> ****************************************************************
--> 5.7 検索述語による遷移の検索
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
-- defining module CNR
--> ----------------------------------------------------------------
--> module for defining check-cnr
--> ----------------------------------------------------------------
-- defining module CHECKcnr
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ****************************************************************
--> 5.8 帰納不変条件の証明スコア
--> ****************************************************************
processing input : ./qlock-mx-iinv-ps.cafe
--> ****************************************************************
--> 5.8 帰納不変条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 状態述語((mx S:State) and (hq=c S))が
--> 1段の遷移で不変であることを規定した現状態/次状態関係述語cnr-iinv
--> ----------------------------------------------------------------
-- defining module CNRiinv-mx
--> ----------------------------------------------------------------
--> 述語cnr-iinvが任意の遷移について成り立つかをチェックする述語check-iinv
--> ----------------------------------------------------------------
-- defining module IINVcheck-mx
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 練習問題5.1 [帰納不変条件wt] 解答例開始
--> ****************************************************************
--> ****************************************************************
--> wt: [Q:Aq r (Ar:Aid Sr:As) w Sw:As c Sc:As]
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-wt: module for checking on WT
--> ----------------------------------------------------------------
-- defining module IINVcheck-mx-wt
--> ================================================================
--> check (iinvCheck-wt = true) 1
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-mx-wt
:goal { ** root -----------------------------------------
-- context module: IINVcheck-mx-wt
-- sentence to be proved
eq iinvCheck-wt = true .
}
** Initial goal (root) is generated. **
q=nil defined as :csp{eq q = nilQ . eq q = (a1 | q1) . }
[q=nil]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "1".
[RD-]=> :goal{2}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "2".
(consumed 0.0127 sec, including 119 rewrites + 1594 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-mx-wt * 1
--> ================================================================
--> check (iinvCheck-wt = true) 2
--> ----------------------------------------------------------------
--> 1
-- opening module IINVcheck-mx-wt(X.STATE)
-- reduce in %IINVcheck-mx-wt(X.STATE) : (iinvCheck-wt):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0005 sec for 60 rewrites + 778 matches)
--> 2
-- opening module IINVcheck-mx-wt(X.STATE)
-- reduce in %IINVcheck-mx-wt(X.STATE) : (iinvCheck-wt):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0006 sec for 57 rewrites + 812 matches)
**> QED *** IINVcheck-mx-wt * 2
--> ****************************************************************
--> 練習問題5.1 解答例終了
--> ****************************************************************
--> ****************************************************************
--> ty: [(A:Aid | Q:Aq) r Sr:As w (A:Aid Sw:As) c Sc:As]
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-ty -- module for checking on TY
--> ----------------------------------------------------------------
-- defining module IINVcheck-mx-ty
--> ================================================================
--> check (iinvCheck-ty = true) 1
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-mx-ty
:goal { ** root -----------------------------------------
-- context module: IINVcheck-mx-ty
-- sentence to be proved
eq iinvCheck-ty = true .
}
** Initial goal (root) is generated. **
sc=em defined as :csp{eq sc = empS . eq sc = (ac1 sc1) . }
a=ac1 defined as :csp{eq a = ac1 . eq (a =a ac1) = false . }
[sc=em]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "1".
[a=ac1]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (ac1 (a sc1)) ]),
Sw:As |-> sw, A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (ac1 sc1) }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c (ac1 sc1) ])
=> ([ (a | q) r sr w sw c (a (ac1 sc1)) ])) % true) % (true xor ((a =a ac1)
and ((sc1 =< empS) and (sc1 =< a))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (ac1 (a sc1)) ]),
Sw:As |-> sw, A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (ac1 sc1) }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c (ac1 sc1) ])
=> ([ (a | q) r sr w sw c (a (ac1 sc1)) ])) % true) % (true xor ((a =a ac1)
and ((sc1 =< empS) and (sc1 =< a))))):Info
[a=ac1]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "2-1".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "2-2".
(consumed 0.0286 sec, including 1005 rewrites + 8105 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-mx-ty * 1
--> ================================================================
--> check (iinvCheck-ty = true) 2
--> ----------------------------------------------------------------
--> 1
-- opening module IINVcheck-mx-ty(X.STATE)
-- reduce in %IINVcheck-mx-ty(X.STATE) : (iinvCheck-ty):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0002 sec for 60 rewrites + 164 matches)
--> 2-1
-- opening module IINVcheck-mx-ty(X.STATE)
-- reduce in %IINVcheck-mx-ty(X.STATE) : (iinvCheck-ty):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0004 sec for 95 rewrites + 467 matches)
--> 2-2
-- opening module IINVcheck-mx-ty(X.STATE)
-- reduce in %IINVcheck-mx-ty(X.STATE) : (iinvCheck-ty):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0004 sec for 104 rewrites + 508 matches)
**> QED *** IINVcheck-mx-ty * 2
--> ================================================================
--> ****************************************************************
--> 練習問題5.2 [帰納不変条件ex] 解答例開始
--> ****************************************************************
--> ****************************************************************
--> ex: [(A:Aid | Q:Aq) r Sr:As w Sw:As c Sc:As]
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-mx-ex: module for checking on EX
--> ----------------------------------------------------------------
-- defining module IINVcheck-mx-ex
--> ================================================================
--> check (iinvCheck-ex = true) 1
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-mx-ex
:goal { ** root -----------------------------------------
-- context module: IINVcheck-mx-ex
-- sentence to be proved
eq iinvCheck-ex = true .
}
** Initial goal (root) is generated. **
sc=em defined as :csp{eq sc = empS . eq sc = (ac1 sc1) . }
sc1=e defined as :csp{eq sc1 = empS . eq sc1 = (ac2 sc2) . }
a=ac1 defined as :csp{eq a = ac1 . eq (a =a ac1) = false . }
[sc=em]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "1".
[sc1=e]=> :goal{1}
[RD-]=> :goal{1}
[a=ac1]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> ((a in sc1) xor ((a =a ac1) xor ((a =a ac1) and (a in sc1)))),
SS:State |-> ([ q r (a sr) w sw c ((ac1 sc1) -as a) ]), A:Aid |-> a, Q:Aq |-> q,
Sr:As |-> sr, Sc:As |-> (ac1 sc1), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (ac1 sc1) ]) => (
[ q r (a sr) w sw c ((ac1 sc1) -as a) ])) % ((a in sc1) xor ((a =a ac1)
xor ((a =a ac1) and (a in sc1))))) % (((sc1 =< a) and ((a =a ac1) and (sc1
=< empS))) xor (true xor (((((ac1 sc1) -as a) =< (hd q)) and ((((ac1 sc1)
-as a) =< empS) and ((mx ((ac1 sc1) -as a)) and ((q =aq nilQ) and (((hd q)
in ((ac1 sc1) -as a)) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))))))
xor (((mx ((ac1 sc1) -as a)) and ((((ac1 sc1) -as a) =< (hd q)) and ((((ac1 sc1)
-as a) =< empS) and (((hd q) in ((ac1 sc1) -as a)) and ((sc1 =< empS) and ((a
=a ac1) and (sc1 =< a))))))) xor (((mx ((ac1 sc1) -as a)) and ((((ac1 sc1)
-as a) =< empS) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))) xor ((((
hd q) in ((ac1 sc1) -as a)) and ((mx ((ac1 sc1) -as a)) and ((((ac1 sc1)
-as a) =< (hd q)) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))))
xor ((((ac1 sc1) -as a) =< (hd q)) and ((q =aq nilQ) and (((hd q) in ((ac1 sc1)
-as a)) and ((mx ((ac1 sc1) -as a)) and ((a =a ac1) and ((sc1 =< a) and (sc1
=< empS)))))))))))))):Info
{ CC:Bool |-> ((a in sc1) xor ((a =a ac1) xor ((a =a ac1) and (a in sc1)))),
SS:State |-> ([ q r (a sr) w sw c ((ac1 sc1) -as a) ]), A:Aid |-> a, Q:Aq |-> q,
Sr:As |-> sr, Sc:As |-> (ac1 sc1), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (ac1 sc1) ]) => (
[ q r (a sr) w sw c ((ac1 sc1) -as a) ])) % ((a in sc1) xor ((a =a ac1)
xor ((a =a ac1) and (a in sc1))))) % (((sc1 =< a) and ((a =a ac1) and (sc1
=< empS))) xor (true xor (((((ac1 sc1) -as a) =< (hd q)) and ((((ac1 sc1)
-as a) =< empS) and ((mx ((ac1 sc1) -as a)) and ((q =aq nilQ) and (((hd q)
in ((ac1 sc1) -as a)) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))))))
xor (((mx ((ac1 sc1) -as a)) and ((((ac1 sc1) -as a) =< (hd q)) and ((((ac1 sc1)
-as a) =< empS) and (((hd q) in ((ac1 sc1) -as a)) and ((sc1 =< empS) and ((a
=a ac1) and (sc1 =< a))))))) xor (((mx ((ac1 sc1) -as a)) and ((((ac1 sc1)
-as a) =< empS) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))) xor ((((
hd q) in ((ac1 sc1) -as a)) and ((mx ((ac1 sc1) -as a)) and ((((ac1 sc1)
-as a) =< (hd q)) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))))
xor ((((ac1 sc1) -as a) =< (hd q)) and ((q =aq nilQ) and (((hd q) in ((ac1 sc1)
-as a)) and ((mx ((ac1 sc1) -as a)) and ((a =a ac1) and ((sc1 =< a) and (sc1
=< empS)))))))))))))):Info
[sc1=e]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
{ CC:Bool |-> (a =a ac1), SS:State |-> ([ q r (a sr) w sw c (ac1 -as a)
]), A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c ac1 ]) => ([ q r (a sr)
w sw c (ac1 -as a) ])) % (a =a ac1)) % ((ac1 =a a) xor (true xor ((((ac1
-as a) =< (hd q)) and (((ac1 -as a) =< empS) and ((mx (ac1 -as a)) and ((q
=aq nilQ) and (((hd q) in (ac1 -as a)) and (ac1 =a a)))))) xor (((mx (ac1
-as a)) and (((ac1 -as a) =< (hd q)) and (((ac1 -as a) =< empS) and (((hd q)
in (ac1 -as a)) and (ac1 =a a))))) xor (((mx (ac1 -as a)) and (((ac1 -as a)
=< empS) and (ac1 =a a))) xor ((((hd q) in (ac1 -as a)) and ((mx (ac1 -as a))
and (((ac1 -as a) =< (hd q)) and (ac1 =a a)))) xor (((ac1 -as a) =< (hd q))
and ((q =aq nilQ) and (((hd q) in (ac1 -as a)) and ((mx (ac1 -as a)) and (ac1
=a a)))))))))))):Info
{ CC:Bool |-> (a =a ac1), SS:State |-> ([ q r (a sr) w sw c (ac1 -as a)
]), A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c ac1 ]) => ([ q r (a sr)
w sw c (ac1 -as a) ])) % (a =a ac1)) % ((ac1 =a a) xor (true xor ((((ac1
-as a) =< (hd q)) and (((ac1 -as a) =< empS) and ((mx (ac1 -as a)) and ((q
=aq nilQ) and (((hd q) in (ac1 -as a)) and (ac1 =a a)))))) xor (((mx (ac1
-as a)) and (((ac1 -as a) =< (hd q)) and (((ac1 -as a) =< empS) and (((hd q)
in (ac1 -as a)) and (ac1 =a a))))) xor (((mx (ac1 -as a)) and (((ac1 -as a)
=< empS) and (ac1 =a a))) xor ((((hd q) in (ac1 -as a)) and ((mx (ac1 -as a))
and (((ac1 -as a) =< (hd q)) and (ac1 =a a)))) xor (((ac1 -as a) =< (hd q))
and ((q =aq nilQ) and (((hd q) in (ac1 -as a)) and ((mx (ac1 -as a)) and (ac1
=a a)))))))))))):Info
[a=ac1]=> :goal{2-1}
** Generated 2 goals
[RD-]=> :goal{2-1-1}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "2-1-1".
[RD-]=> :goal{2-1-2}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "2-1-2".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "2-2".
[a=ac1]=> :goal{2-2}
[RD-]=> :goal{2-2}
(consumed 0.0958 sec, including 1537 rewrites + 65303 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-mx-ex * 1
--> ================================================================
--> check (iinvCheck-ex = true) 2
--> ----------------------------------------------------------------
--> 1
-- opening module IINVcheck-mx-ex(X.STATE)
-- reduce in %IINVcheck-mx-ex(X.STATE) : (iinvCheck-ex):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0013 sec for 60 rewrites + 1709 matches)
--> 2-1-1
-- opening module IINVcheck-mx-ex(X.STATE)
-- reduce in %IINVcheck-mx-ex(X.STATE) : (iinvCheck-ex):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0003 sec for 68 rewrites + 157 matches)
--> 2-1-2
-- opening module IINVcheck-mx-ex(X.STATE)
-- reduce in %IINVcheck-mx-ex(X.STATE) : (iinvCheck-ex):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0009 sec for 83 rewrites + 1167 matches)
--> 2-2
-- opening module IINVcheck-mx-ex(X.STATE)
-- reduce in %IINVcheck-mx-ex(X.STATE) : (iinvCheck-ex):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0030 sec for 110 rewrites + 4176 matches)
**> QED *** IINVcheck-mx-ex * 2
--> ================================================================
--> ****************************************************************
--> 練習問題5.2 解答例終了
--> ****************************************************************
--> ****************************************************************
--> 5.8.1 未使用定数の宣言と証明規則の定義
--> ****************************************************************
--> ****************************************************************
--> 5.8.2 binspect と bshow
--> ****************************************************************
** Beginning a new proof in IINVcheck-mx-ty
:goal { ** root -----------------------------------------
-- context module: IINVcheck-mx-ty
-- sentence to be proved
eq iinvCheck-ty = true .
}
** Initial goal (root) is generated. **
[RD-]=> :goal{root}
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (a sc) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> sc }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c sc ]) => ([ (a
| q) r sr w sw c (a sc) ])) % true) % (((a in sc) and ((sc =< a) and (mx sc)))
xor (((sc =< empS) and (mx sc)) xor (((sc =< empS) and ((sc =< a) and ((a
in sc) and (mx sc)))) xor (true xor ((mx sc) and ((sc =< empS) and (sc =< a)))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (a sc) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> sc }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c sc ]) => ([ (a
| q) r sr w sw c (a sc) ])) % true) % (((a in sc) and ((sc =< a) and (mx sc)))
xor (((sc =< empS) and (mx sc)) xor (((sc =< empS) and ((sc =< a) and ((a
in sc) and (mx sc)))) xor (true xor ((mx sc) and ((sc =< empS) and (sc =< a)))))))):Info
(consumed 0.0072 sec, including 531 rewrites + 7984 matches)
>> Next target goal is "root".
>> Remaining 1 goal.
(((sc =< a) and ((a in sc) and (mx sc))) xor (((sc =< empS) and (mx sc)) xor (((sc =< empS) and ((sc =< a) and ((a in sc) and (mx sc)))) xor (true xor ((mx sc) and ((sc =< empS) and (sc =< a))))))):Bool
(consumed 0.0001 sec, including 0 rewrites + 85 matches, 10 memo hits)
--> (((mx sc) and (sc =< empS)) xor (true xor (((sc =< empS) and ((sc =< a) and (mx sc))) xor (((sc =< a) and ((mx sc) and ((a in sc) and (sc =< empS)))) xor ((a in sc) and ((mx sc) and (sc =< a)))))))
** Abstracted boolean term:
(consumed 0.000 sec. for abstraction)
((`P-3:Bool and (`P-1:Bool and `P-4:Bool)) xor ((`P-2:Bool and (`P-4 and (`P-1 and `P-3))) xor ((`P-1 and (`P-3 and `P-2)) xor (true xor (`P-2 and `P-1)))))
where
`P-1 = (mx sc)
`P-2 = (sc =< empS)
`P-3 = (sc =< a)
`P-4 = (a in sc)
>> xor ***>
>> and --->
`P-1 = (mx sc)
`P-2 = (sc =< empS)
<----------
>> and --->
`P-1 = (mx sc)
`P-2 = (sc =< empS)
`P-3 = (sc =< a)
<----------
>> and --->
`P-1 = (mx sc)
`P-2 = (sc =< empS)
`P-3 = (sc =< a)
`P-4 = (a in sc)
<----------
>> and --->
`P-1 = (mx sc)
`P-3 = (sc =< a)
`P-4 = (a in sc)
<----------
true
<**********
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ****************************************************************
--> 練習問題5.1 [帰納不変条件wt] 解答例
--> ****************************************************************
--> ****************************************************************
--> 練習問題5.2 [帰納不変条件ex] 解答例
--> ****************************************************************
--> ****************************************************************
--> 5.9 遷移システムの到達特性
--> ****************************************************************
processing input : ./qlock-wc-prp.cafe
--> ****************************************************************
--> 5.9 遷移システムの到達特性
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 基本到達特性wcを記述するための2つの状態述語:(_inw_),(_inc_)
--> ----------------------------------------------------------------
-- defining module! WCprp
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
processing input : ./qlock-wc-inv-lm.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-init-ps.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-inv-prp.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-qtos.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> モジュール'Q->S'
--> ----------------------------------------------------------------
-- defining module! Q->S
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 基本到達特性wcの証明のための5つの不変特性:
--> (r^w S),(w^c S),(r^c S),(q=wc S),(qvr S)
--> を定義するモジュール
--> ----------------------------------------------------------------
-- defining module! WCinvs
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 初期状態条件のチェックのためのモジュール
--> ----------------------------------------------------------------
-- defining module INITcheck-wc
--> ================================================================
--> check (initCheck = true)
--> ----------------------------------------------------------------
** Beginning a new proof in INITcheck-wc
:goal { ** root -----------------------------------------
-- context module: INITcheck-wc
-- sentence to be proved
eq initCheck = true .
}
** Initial goal (root) is generated. **
q=nil defined as :csp{eq q = nilQ . eq (q =aq nilQ) = false . }
sr=em defined as :csp{eq sr = empS . eq (sr =as empS) = false . }
sw=em defined as :csp{eq sw = empS . eq (sw =as empS) = false . }
sc=em defined as :csp{eq sc = empS . eq (sc =as empS) = false . }
[q=nil]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[sr=em]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-1".
[sw=em]=> :goal{1-1}
[RD-]=> :goal{1-1}
[sc=em]=> :goal{1-1}
[RD-]=> :goal{1-1}
[RD-]=> :goal{1-2}
[sw=em]=> :goal{1-2}
** Generated 2 goals
[RD-]=> :goal{1-2-1}
[sc=em]=> :goal{1-2-1}
** Generated 2 goals
[RD-]=> :goal{1-2-1-1}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-2-1-1".
[RD-]=> :goal{1-2-1-2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-2-1-2".
[RD-]=> :goal{1-2-2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-2-2".
[sc=em]=> :goal{1-2-2}
[RD-]=> :goal{1-2-2}
[RD-]=> :goal{2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "2".
[sr=em]=> :goal{2}
[RD-]=> :goal{2}
[sw=em]=> :goal{2}
[RD-]=> :goal{2}
[sc=em]=> :goal{2}
[RD-]=> :goal{2}
(consumed 0.0117 sec, including 525 rewrites + 4622 matches)
** All goals are successfully discharged.
**> QED *** INITcheck-wc
--> ================================================================
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-wc-iinv-ps.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-state-lm.cafe
--> ****************************************************************
--> 5.11.1 補題モジュール STATE-lm
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ================================================================
--> モジュールSTATEで,等式
--> cq (A:Aid in (S1:As S2:As)) = (A in S1) or (A in S2)
--> if (not(S1 == empS) and not(S2 == empS)) .
--> が成り立つことを,
--> S:Asに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> module for the proof (proof module)
--> ----------------------------------------------------------------
-- defining module STains1s2
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- defining module STains1s2-base
-- opening module STains1s2-base(X.STATE)
-- reduce in %STains1s2-base(X.STATE) : (ains1s2(a,empS,s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 15 rewrites + 40 matches)
**> QED *** STains1s2 * base * t
-- opening module STains1s2-base(X.STATE)
-- reduce in %STains1s2-base(X.STATE) : (ains1s2(a,empS,s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 15 rewrites + 42 matches)
**> QED *** STains1s2 * base * f
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- defining module STains1s2-step
-- opening module STains1s2-step(X.STATE)
-- reduce in %STains1s2-step(X.STATE) : (ains1s2(a,(a1 s1),s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0004 sec for 41 rewrites + 557 matches)
**> QED *** STains1s2 * step * t
-- opening module STains1s2-step(X.STATE)
-- reduce in %STains1s2-step(X.STATE) : (ains1s2(a,(a1 s1),s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0003 sec for 41 rewrites + 561 matches)
**> QED *** STains1s2 * step * f
--> ================================================================
--> ================================================================
--> モジュールSTATEで,等式
--> eq[s1=<s2]:
--> ((S1:As =< S2:As) and (S1 =< (A:Aid S2))) = (S1 =< S2) .
--> が成り立つことを,
--> S1:Asに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- opening module STATE(X)
-- reduce in %STATE(X) : (((empS =< s2) and (empS =< (a s2))) = (empS =< s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 7 matches)
**> QED *** ST * s1=<s2 * base
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- opening module STATE(X)
-- reduce in %STATE(X) : ((((a1 s1) =< s2) and ((a1 s1) =< (a s2))) = ((a1 s1) =< s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0004 sec for 17 rewrites + 647 matches)
**> QED *** ST * s1=<s2 * step
--> ================================================================
--> ================================================================
--> モジュールSTATEで,等式
--> cq (S1:As =< (A:Aid S2:As)) = S1 =< S2 if (not(A in S1)) .
--> が成り立つことを,
--> S1:Asに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> proof module
--> ----------------------------------------------------------------
-- defining module STs1=<as2
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- opening module STs1=<as2(X.STATE)
-- reduce in %STs1=<as2(X.STATE) : (s1=<as2(empS,a,s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 11 rewrites + 17 matches)
**> QED *** STs1=<as2 * base
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- opening module STs1=<as2(X.STATE)
** Beginning a new proof in %
:goal { ** root -----------------------------------------
-- context module: %
-- sentence to be proved
eq s1=<as2((a1 s1),a,s2) = true .
}
** Initial goal (root) is generated. **
a=a1 defined as :csp{eq a = a1 . eq (a =a a1) = false . }
a1@s2 defined as :csp{eq s2 = (a1 s21) . eq (a1 in s2) = false . }
a@s1 defined as :csp{eq s1 = (a s11) . eq (a in s1) = false . }
[a=a1]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "1".
[a1@s2]=> :goal{1}
[RD-]=> :goal{1}
[a@s1]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
[a1@s2]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[a@s1]=> :goal{2-1}
** Generated 2 goals
[RD-]=> :goal{2-1-1}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "2-1-1".
[RD-]=> :goal{2-1-2}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "2-1-2".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "2-2".
[a@s1]=> :goal{2-2}
[RD-]=> :goal{2-2}
(consumed 0.0070 sec, including 239 rewrites + 2414 matches)
** All goals are successfully discharged.
**> QED *** STs1=<as2 * step
--> ================================================================
--> ----------------------------------------------------------------
--> lemmas on STATE
--> ----------------------------------------------------------------
-- defining module! STATE-lm
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> CNRiinv-wc -- module for defining cnr for inductive invariant
--> ----------------------------------------------------------------
-- defining module CNRiinv-wc
--> ----------------------------------------------------------------
--> IINVcheck-wc -- module for checking invariant/stability
--> ----------------------------------------------------------------
-- defining module IINVcheck-wc
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> wt: [Q r Ar Sr w Sw c Sc]
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-wc-wt: module for checking on WT
--> ----------------------------------------------------------------
-- defining module IINVcheck-wc-wt
--> ================================================================
--> check (iinvCheck-wt = true)
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-wc-wt
:goal { ** root -----------------------------------------
-- context module: IINVcheck-wc-wt
-- sentence to be proved
eq iinvCheck-wt = true .
}
** Initial goal (root) is generated. **
ar!sw defined as :csp{eq (ar in sw) = true . eq (ar in sw) = false . }
ar!sc defined as :csp{eq (ar in sc) = true . eq (ar in sc) = false . }
[ar!sw]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "1".
[ar!sc]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (ar sw) c sc ]), Sr:As
|-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> sc, Sw:As |-> sw }
--> (((### not determined ### ; ([ q r (ar sr) w sw c sc ]) => ([ (q | ar)
r sr w (ar sw) c sc ])) % true) % ((((sc ^ sw) =< empS) and (((sc sw) =< (
q->s q)) and (((q->s q) =< (sc sw)) and (((if (ar in sc) then (ar (sr ^ sc))
else (sr ^ sc) fi) =< empS) and ((sr ^ sw) =< empS))))) xor (true xor (((
q->s q) =< (sw sc)) and (((sw ^ sc) =< empS) and (((sw sc) =< (q->s q))
and (((if (ar in sc) then (ar (sw ^ sc)) else (sw ^ sc) fi) =< empS) and (((sr
^ sw) =< empS) and (((if (ar in sc) then (ar (sr ^ sc)) else (sr ^ sc) fi)
=< empS) and ((sc ^ sr) =< empS)))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (ar sw) c sc ]), Sr:As
|-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> sc, Sw:As |-> sw }
--> (((### not determined ### ; ([ q r (ar sr) w sw c sc ]) => ([ (q | ar)
r sr w (ar sw) c sc ])) % true) % ((((sc ^ sw) =< empS) and (((sc sw) =< (
q->s q)) and (((q->s q) =< (sc sw)) and (((if (ar in sc) then (ar (sr ^ sc))
else (sr ^ sc) fi) =< empS) and ((sr ^ sw) =< empS))))) xor (true xor (((
q->s q) =< (sw sc)) and (((sw ^ sc) =< empS) and (((sw sc) =< (q->s q))
and (((if (ar in sc) then (ar (sw ^ sc)) else (sw ^ sc) fi) =< empS) and (((sr
^ sw) =< empS) and (((if (ar in sc) then (ar (sr ^ sc)) else (sr ^ sc) fi)
=< empS) and ((sc ^ sr) =< empS)))))))))):Info
[ar!sc]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "2-1".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "2-2".
(consumed 0.0645 sec, including 2296 rewrites + 20391 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-wc-wt
--> ****************************************************************
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-wc-ty -- module for checking on TY
--> ----------------------------------------------------------------
-- defining module IINVcheck-wc-ty
--> ================================================================
--> check (iinvCheck-ty = true) (1)
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-wc-ty
:goal { ** root -----------------------------------------
-- context module: IINVcheck-wc-ty
-- sentence to be proved
eq iinvCheck-ty = true .
}
** Initial goal (root) is generated. **
a!sr defined as :csp{eq (a in sr) = true . eq (a in sr) = false . }
a!sc defined as :csp{eq (a in sc) = true . eq (a in sc) = false . }
[a!sr]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "1".
[a!sc]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (a sc) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> sc }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c sc ]) => ([ (a
| q) r sr w sw c (a sc) ])) % true) % ((((if (a in sc) then (a (sw ^ sc))
else (sw ^ sc) fi) =< empS) and (((sw sc) =< (a (q->s q))) and (((q->s q)
=< (a (sc sw))) and (((sc ^ sr) =< empS) and ((sw ^ sr) =< empS))))) xor (true
xor (((sc sw) =< (a (q->s q))) and (((sr ^ sc) =< empS) and (((sr ^ sw)
=< empS) and (((q->s q) =< (a (sc sw))) and (((if (a in sc) then (a (sw ^ sc))
else (sc ^ sw) fi) =< empS) and ((sw ^ sc) =< empS))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (a sc) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> sc }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c sc ]) => ([ (a
| q) r sr w sw c (a sc) ])) % true) % ((((if (a in sc) then (a (sw ^ sc))
else (sw ^ sc) fi) =< empS) and (((sw sc) =< (a (q->s q))) and (((q->s q)
=< (a (sc sw))) and (((sc ^ sr) =< empS) and ((sw ^ sr) =< empS))))) xor (true
xor (((sc sw) =< (a (q->s q))) and (((sr ^ sc) =< empS) and (((sr ^ sw)
=< empS) and (((q->s q) =< (a (sc sw))) and (((if (a in sc) then (a (sw ^ sc))
else (sc ^ sw) fi) =< empS) and ((sw ^ sc) =< empS))))))))):Info
[a!sc]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "2-1".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "2-2".
(consumed 0.0343 sec, including 1078 rewrites + 14392 matches)
** All goals are successfully discharged.
**> QED ** IINVcheck-wc-ty
--> ****************************************************************
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-wc-ex: proof module for checking on EX
--> ----------------------------------------------------------------
-- defining module IINVcheck-wc-ex
--> ================================================================
--> check (iinvCheck-ex = true)
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-wc-ex
:goal { ** root -----------------------------------------
-- context module: IINVcheck-wc-ex
-- sentence to be proved
eq iinvCheck-ex = true .
}
** Initial goal (root) is generated. **
a$sr defined as :csp{eq sr = (a sr-a) . eq (a in sr) = false . }
a$sw defined as :csp{eq sw = (a sw-a) . eq (a in sw) = false . }
a$sc defined as :csp{eq sc = (a sc-a) . eq (a in sc) = false . }
[a$sc]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
{ CC:Bool |-> true, SS:State |-> ([ q r (a sr) w sw c sc-a ]), A:Aid |-> a,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (a sc-a), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (a sc-a) ]) => (
[ q r (a sr) w sw c sc-a ])) % true) % ((((if (a in sw) then (a (sc-a ^ sw))
else (sc-a ^ sw) fi) =< empS) and (((sw sc-a) =< (a (q->s q))) and (((
q->s q) =< (sw sc-a)) and (((if (a in sr) then (a (sc-a ^ sr)) else (sc-a
^ sr) fi) =< empS) and ((sw ^ sr) =< empS))))) xor (true xor (((sc-a sw)
=< (q->s q)) and (((if (a in sw) then (a (sc-a ^ sw)) else (sw ^ sc-a) fi)
=< empS) and (((sr ^ sw) =< empS) and (((if (a in sw) then (a (sr ^ sw))
else (sr ^ sw) fi) =< empS) and (((sr ^ sc-a) =< empS) and (((q->s q) =< (sc-a sw))
and (((sw ^ sc-a) =< empS) and ((if (a in sr) then (a (sc-a ^ sr)) else (sr
^ sc-a) fi) =< empS))))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ q r (a sr) w sw c sc-a ]), A:Aid |-> a,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (a sc-a), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (a sc-a) ]) => (
[ q r (a sr) w sw c sc-a ])) % true) % ((((if (a in sw) then (a (sc-a ^ sw))
else (sc-a ^ sw) fi) =< empS) and (((sw sc-a) =< (a (q->s q))) and (((
q->s q) =< (sw sc-a)) and (((if (a in sr) then (a (sc-a ^ sr)) else (sc-a
^ sr) fi) =< empS) and ((sw ^ sr) =< empS))))) xor (true xor (((sc-a sw)
=< (q->s q)) and (((if (a in sw) then (a (sc-a ^ sw)) else (sw ^ sc-a) fi)
=< empS) and (((sr ^ sw) =< empS) and (((if (a in sw) then (a (sr ^ sw))
else (sr ^ sw) fi) =< empS) and (((sr ^ sc-a) =< empS) and (((q->s q) =< (sc-a sw))
and (((sw ^ sc-a) =< empS) and ((if (a in sr) then (a (sc-a ^ sr)) else (sr
^ sc-a) fi) =< empS))))))))))):Info
[a$sw]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "1-1".
[a$sr]=> :goal{1-1}
[RD-]=> :goal{1-1}
[RD-]=> :goal{1-2}
{ CC:Bool |-> true, SS:State |-> ([ q r (a sr) w sw c sc-a ]), A:Aid |-> a,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (a sc-a), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (a sc-a) ]) => (
[ q r (a sr) w sw c sc-a ])) % true) % ((((sc-a ^ sw) =< empS) and (((sc-a sw)
=< (q->s q)) and (((q->s q) =< (sw sc-a)) and (((if (a in sr) then (a (sc-a
^ sr)) else (sc-a ^ sr) fi) =< empS) and ((sw ^ sr) =< empS))))) xor (true
xor (((sw ^ sc-a) =< empS) and (((q->s q) =< (sw sc-a)) and (((sw ^ sr)
=< empS) and (((sw sc-a) =< (q->s q)) and (((if (a in sr) then (a (sc-a ^ sr))
else (sr ^ sc-a) fi) =< empS) and ((sc-a ^ sr) =< empS))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ q r (a sr) w sw c sc-a ]), A:Aid |-> a,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (a sc-a), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (a sc-a) ]) => (
[ q r (a sr) w sw c sc-a ])) % true) % ((((sc-a ^ sw) =< empS) and (((sc-a sw)
=< (q->s q)) and (((q->s q) =< (sw sc-a)) and (((if (a in sr) then (a (sc-a
^ sr)) else (sc-a ^ sr) fi) =< empS) and ((sw ^ sr) =< empS))))) xor (true
xor (((sw ^ sc-a) =< empS) and (((q->s q) =< (sw sc-a)) and (((sw ^ sr)
=< empS) and (((sw sc-a) =< (q->s q)) and (((if (a in sr) then (a (sc-a ^ sr))
else (sr ^ sc-a) fi) =< empS) and ((sc-a ^ sr) =< empS))))))))):Info
[a$sr]=> :goal{1-2}
** Generated 2 goals
[RD-]=> :goal{1-2-1}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "1-2-1".
[RD-]=> :goal{1-2-2}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "1-2-2".
[RD-]=> :goal{2}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "2".
[a$sw]=> :goal{2}
[RD-]=> :goal{2}
[a$sr]=> :goal{2}
[RD-]=> :goal{2}
(consumed 0.2037 sec, including 4006 rewrites + 33065 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-wc-ex
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> module for lemmas about invariants
--> ----------------------------------------------------------------
-- defining module! INV-lm
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-wc-daq-lm.cafe
--> ****************************************************************
--> 5.10.1 補題モジュール DAQ-lm
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-dms-prp.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./pnat.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
--> PNAT with _+_ and _*_
--> ----------------------------------------------------------------
-- defining module! PNAT
-- defining module! PNAT=
-- defining module! PNAT+ac
-- defining module! PNAT*ac
--> ----------------------------------------------------------------
--> 大小述語_>_が定義されたPNAT
--> ----------------------------------------------------------------
-- defining module! PNAT*ac>
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 基本到達特性wcの証明のための自然数値の減少関数#dms
--> ----------------------------------------------------------------
-- defining module* DMS
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ================================================================
--> モジュールDMSで,等式
--> cq #daq((Q:Aq | A1:Aid),A2:Aid) = #daq(Q,A2)
--> if not(A1 =a A2) and (A2 in (q->s Q)) .
--> が成り立つことを,
--> Q:Aqに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> proof module (module for the proof)
--> ----------------------------------------------------------------
-- defining module DAQqa1a2
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- opening module DAQqa1a2(X.STATE)
-- reduce in %DAQqa1a2(X.STATE) : (#daq-qa1a2(nilQ,a1,a2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 35 rewrites + 104 matches)
**> QED *** DAQqa1a2 * base
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- opening module DAQqa1a2(X.STATE)
** Beginning a new proof in %
:goal { ** root -----------------------------------------
-- context module: %
-- sentence to be proved
eq #daq-qa1a2((a | q),a1,a2) = true .
}
** Initial goal (root) is generated. **
a1=a2 defined as :csp{eq a1 = a2 . eq (a1 =a a2) = false . }
a=a2 defined as :csp{eq a = a2 . eq (a =a a2) = false . }
a2!q defined as :csp{eq (a2 in (q->s q)) = true . eq (a2 in (q->s q)) = false . }
[a1=a2]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq #daq-qa1a2((a | q),a1,a2) = true
[RD-] discharged goal "1".
[a=a2]=> :goal{1}
[RD-]=> :goal{1}
[a2!q]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
[a=a2]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq #daq-qa1a2((a | q),a1,a2) = true
[RD-] discharged goal "2-1".
[a2!q]=> :goal{2-1}
[RD-]=> :goal{2-1}
[RD-]=> :goal{2-2}
[a2!q]=> :goal{2-2}
** Generated 2 goals
[RD-]=> :goal{2-2-1}
[RD-] discharged:
eq #daq-qa1a2((a | q),a1,a2) = true
[RD-] discharged goal "2-2-1".
[RD-]=> :goal{2-2-2}
[RD-] discharged:
eq #daq-qa1a2((a | q),a1,a2) = true
[RD-] discharged goal "2-2-2".
(consumed 0.0088 sec, including 264 rewrites + 3445 matches)
** All goals are successfully discharged.
**> QED *** DAQqa1a2 * step
--> ================================================================
--> ----------------------------------------------------------------
--> module of lemma about #daq
--> ----------------------------------------------------------------
-- defining module! DAQ-lm
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-wc-ps.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> Verification conditions wc1 for wc property
--> (for-all One-Step-Transition (S->S'):State->State
--> ((inv(S) and (A inw S) and not(S inc S))
--> implies
--> (((A inw SS) or (A inc SS)) and
--> (#dms(S,A) > #dms(SS,A)))))
--> ****************************************************************
--> ----------------------------------------------------------------
--> CNRwc1 -- module for defining cnr for wc condition wc1
--> ----------------------------------------------------------------
-- defining module CNRwc1
--> ----------------------------------------------------------------
--> WC1check -- module for checking condition (1) + (2)
--> ----------------------------------------------------------------
-- defining module WC1check
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> ----------------------------------------------------------------
--> WC1check-wt: module for checking wc1 on WTtr
--> ----------------------------------------------------------------
-- defining module WC1check-wt
--> ================================================================
--> check (1Check-wt = true)
--> ----------------------------------------------------------------
** Beginning a new proof in WC1check-wt
:goal { ** root -----------------------------------------
-- context module: WC1check-wt
-- sentence to be proved
eq wc1check-wt = true .
}
** Initial goal (root) is generated. **
sc=em defined as :csp{eq sc = empS . eq sc = (ac1 | sc1) . }
aa@sw defined as :csp{eq sw = (aa sw1) . eq (aa in sw) = false . }
ar=aa defined as :csp{eq ar = aa . eq (ar =a aa) = false . }
aa!q defined as :csp{eq (aa in (q->s q)) = true . eq (aa in (q->s q)) = false . }
[sc=em]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (ar sw) c empS ]), Sr:As
|-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> empS, Sw:As |-> sw }
--> (((### not determined ### ; ([ q r (ar sr) w sw c empS ]) => ([ (q
| ar) r sr w (ar sw) c empS ])) % true) % (((aa in sw) and inv(([ q r (ar sr)
w sw c empS ]))) xor (true xor (inv(([ q r (ar sr) w sw c empS ])) and (((
s ((# sr) + (#daq(q,aa) + (#daq(q,aa) + #daq(q,aa))))) > ((# sr) + (#daq((q
| ar),aa) + (#daq((q | ar),aa) + #daq((q | ar),aa))))) and (aa in sw)))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (ar sw) c empS ]), Sr:As
|-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> empS, Sw:As |-> sw }
--> (((### not determined ### ; ([ q r (ar sr) w sw c empS ]) => ([ (q
| ar) r sr w (ar sw) c empS ])) % true) % (((aa in sw) and inv(([ q r (ar sr)
w sw c empS ]))) xor (true xor (inv(([ q r (ar sr) w sw c empS ])) and (((
s ((# sr) + (#daq(q,aa) + (#daq(q,aa) + #daq(q,aa))))) > ((# sr) + (#daq((q
| ar),aa) + (#daq((q | ar),aa) + #daq((q | ar),aa))))) and (aa in sw)))))):Info
[aa@sw]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (aa (ar sw1)) c empS
]), Sr:As |-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> empS, Sw:As |-> (aa sw1) }
--> (((### not determined ### ; ([ q r (ar sr) w (aa sw1) c empS ]) => (
[ (q | ar) r sr w (ar (aa sw1)) c empS ])) % true) % (inv(([ q r (ar sr)
w (aa sw1) c empS ])) xor (true xor (((s ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ #daq(q,aa))))) > ((# sr) + (#daq((q | ar),aa) + (#daq((q | ar),aa) + #daq((q
| ar),aa))))) and inv(([ q r (ar sr) w (aa sw1) c empS ])))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (aa (ar sw1)) c empS
]), Sr:As |-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> empS, Sw:As |-> (aa sw1) }
--> (((### not determined ### ; ([ q r (ar sr) w (aa sw1) c empS ]) => (
[ (q | ar) r sr w (ar (aa sw1)) c empS ])) % true) % (inv(([ q r (ar sr)
w (aa sw1) c empS ])) xor (true xor (((s ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ #daq(q,aa))))) > ((# sr) + (#daq((q | ar),aa) + (#daq((q | ar),aa) + #daq((q
| ar),aa))))) and inv(([ q r (ar sr) w (aa sw1) c empS ])))))):Info
[ar=aa]=> :goal{1-1}
** Generated 2 goals
[RD-]=> :goal{1-1-1}
[RD-] discharged:
eq wc1check-wt = true
[RD-] discharged goal "1-1-1".
[aa!q]=> :goal{1-1-1}
[RD-]=> :goal{1-1-1}
[RD-]=> :goal{1-1-2}
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (aa (ar sw1)) c empS
]), Sr:As |-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> empS, Sw:As |-> (aa sw1) }
--> (((### not determined ### ; ([ q r (ar sr) w (aa sw1) c empS ]) => (
[ (q | ar) r sr w (ar (aa sw1)) c empS ])) % true) % (inv(([ q r (ar sr)
w (aa sw1) c empS ])) xor (true xor (((s ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ #daq(q,aa))))) > ((# sr) + (#daq((q | ar),aa) + (#daq((q | ar),aa) + #daq((q
| ar),aa))))) and inv(([ q r (ar sr) w (aa sw1) c empS ])))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (aa (ar sw1)) c empS
]), Sr:As |-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> empS, Sw:As |-> (aa sw1) }
--> (((### not determined ### ; ([ q r (ar sr) w (aa sw1) c empS ]) => (
[ (q | ar) r sr w (ar (aa sw1)) c empS ])) % true) % (inv(([ q r (ar sr)
w (aa sw1) c empS ])) xor (true xor (((s ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ #daq(q,aa))))) > ((# sr) + (#daq((q | ar),aa) + (#daq((q | ar),aa) + #daq((q
| ar),aa))))) and inv(([ q r (ar sr) w (aa sw1) c empS ])))))):Info
[aa!q]=> :goal{1-1-2}
** Generated 2 goals
[RD-]=> :goal{1-1-2-1}
[RD-] discharged:
eq wc1check-wt = true
[RD-] discharged goal "1-1-2-1".
[RD-]=> :goal{1-1-2-2}
[RD-] discharged:
eq wc1check-wt = true
[RD-] discharged goal "1-1-2-2".
[RD-]=> :goal{1-2}
[RD-] discharged:
eq wc1check-wt = true
[RD-] discharged goal "1-2".
[ar=aa]=> :goal{1-2}
[RD-]=> :goal{1-2}
[aa!q]=> :goal{1-2}
[RD-]=> :goal{1-2}
[RD-]=> :goal{2}
[RD-] discharged:
eq wc1check-wt = true
[RD-] discharged goal "2".
[aa@sw]=> :goal{2}
[RD-]=> :goal{2}
[ar=aa]=> :goal{2}
[RD-]=> :goal{2}
[aa!q]=> :goal{2}
[RD-]=> :goal{2}
(consumed 0.1339 sec, including 15617 rewrites + 153860 matches)
** All goals are successfully discharged.
**> QED *** WC1check-wt
--> ****************************************************************
--> 練習問題5.3 [到達帰納条件ty] 解答例開始
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> ----------------------------------------------------------------
--> WC1check-ty -- module for checking wc1 on TYtr
--> ----------------------------------------------------------------
-- defining module WC1check-ty
--> ================================================================
--> check (wc1check-ty = true)
--> ----------------------------------------------------------------
** Beginning a new proof in WC1check-ty
:goal { ** root -----------------------------------------
-- context module: WC1check-ty
-- sentence to be proved
eq wc1check-ty = true .
}
** Initial goal (root) is generated. **
sc=em defined as :csp{eq sc = empS . eq sc = (ac1 sc1) . }
sc1=e defined as :csp{eq sc1 = empS . eq sc1 = (ac2 sc2) . }
a=ac1 defined as :csp{eq a = ac1 . eq (a =a ac1) = false . }
[sc=em]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq wc1check-ty = true
[RD-] discharged goal "1".
[sc1=e]=> :goal{1}
[RD-]=> :goal{1}
[a=ac1]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (ac1 (a sc1)) ]),
Sw:As |-> sw, A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (ac1 sc1) }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c (ac1 sc1) ])
=> ([ (a | q) r sr w sw c (a (ac1 sc1)) ])) % true) % (((aa in sc1) and (inv((
[ (a | q) r sr w (a sw) c (ac1 sc1) ])) and ((aa in sw) and (aa =a ac1))))
xor (((aa in sc1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa
in sw))) xor (((aa =a ac1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1)
])) and (aa in sw))) xor (((aa in sc1) and (inv(([ (a | q) r sr w (a sw)
c (ac1 sc1) ])) and ((aa =a ac1) and (aa =a a)))) xor (((aa =a a) and (inv((
[ (a | q) r sr w (a sw) c (ac1 sc1) ])) and ((aa in sw) and (aa =a ac1))))
xor (((aa in sc1) and ((aa =a ac1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1)
])) and ((aa in sw) and (aa =a a))))) xor (true xor ((inv(([ (a | q) r sr
w (a sw) c (ac1 sc1) ])) and (aa in sw)) xor (((aa =a a) and (inv(([ (a | q)
r sr w (a sw) c (ac1 sc1) ])) and ((aa in sc1) and (aa in sw)))) xor ((inv((
[ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa =a a)) xor (((aa in sw)
and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa =a a))) xor (((aa
=a ac1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa =a a)))
xor ((aa in sc1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa
=a a)))))))))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (ac1 (a sc1)) ]),
Sw:As |-> sw, A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (ac1 sc1) }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c (ac1 sc1) ])
=> ([ (a | q) r sr w sw c (a (ac1 sc1)) ])) % true) % (((aa in sc1) and (inv((
[ (a | q) r sr w (a sw) c (ac1 sc1) ])) and ((aa in sw) and (aa =a ac1))))
xor (((aa in sc1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa
in sw))) xor (((aa =a ac1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1)
])) and (aa in sw))) xor (((aa in sc1) and (inv(([ (a | q) r sr w (a sw)
c (ac1 sc1) ])) and ((aa =a ac1) and (aa =a a)))) xor (((aa =a a) and (inv((
[ (a | q) r sr w (a sw) c (ac1 sc1) ])) and ((aa in sw) and (aa =a ac1))))
xor (((aa in sc1) and ((aa =a ac1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1)
])) and ((aa in sw) and (aa =a a))))) xor (true xor ((inv(([ (a | q) r sr
w (a sw) c (ac1 sc1) ])) and (aa in sw)) xor (((aa =a a) and (inv(([ (a | q)
r sr w (a sw) c (ac1 sc1) ])) and ((aa in sc1) and (aa in sw)))) xor ((inv((
[ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa =a a)) xor (((aa in sw)
and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa =a a))) xor (((aa
=a ac1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa =a a)))
xor ((aa in sc1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa
=a a)))))))))))))))):Info
[sc1=e]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (ac1 a) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1 }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c ac1 ]) => ([ (a
| q) r sr w sw c (a ac1) ])) % true) % ((inv(([ (a | q) r sr w (a sw) c ac1
])) and (aa in sw)) xor (((aa =a a) and (inv(([ (a | q) r sr w (a sw) c ac1
])) and ((aa =a ac1) and (aa in sw)))) xor ((inv(([ (a | q) r sr w (a sw)
c ac1 ])) and (aa =a a)) xor (true xor (((aa in sw) and (inv(([ (a | q) r sr
w (a sw) c ac1 ])) and (aa =a ac1))) xor (((aa in sw) and (inv(([ (a | q)
r sr w (a sw) c ac1 ])) and (aa =a a))) xor ((aa =a ac1) and (inv(([ (a | q)
r sr w (a sw) c ac1 ])) and (aa =a a)))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (ac1 a) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1 }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c ac1 ]) => ([ (a
| q) r sr w sw c (a ac1) ])) % true) % ((inv(([ (a | q) r sr w (a sw) c ac1
])) and (aa in sw)) xor (((aa =a a) and (inv(([ (a | q) r sr w (a sw) c ac1
])) and ((aa =a ac1) and (aa in sw)))) xor ((inv(([ (a | q) r sr w (a sw)
c ac1 ])) and (aa =a a)) xor (true xor (((aa in sw) and (inv(([ (a | q) r sr
w (a sw) c ac1 ])) and (aa =a ac1))) xor (((aa in sw) and (inv(([ (a | q)
r sr w (a sw) c ac1 ])) and (aa =a a))) xor ((aa =a ac1) and (inv(([ (a | q)
r sr w (a sw) c ac1 ])) and (aa =a a)))))))))):Info
[a=ac1]=> :goal{2-1}
** Generated 2 goals
[RD-]=> :goal{2-1-1}
[RD-] discharged:
eq wc1check-ty = true
[RD-] discharged goal "2-1-1".
[RD-]=> :goal{2-1-2}
[RD-] discharged:
eq wc1check-ty = true
[RD-] discharged goal "2-1-2".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq wc1check-ty = true
[RD-] discharged goal "2-2".
[a=ac1]=> :goal{2-2}
[RD-]=> :goal{2-2}
(consumed 0.7153 sec, including 68209 rewrites + 1178332 matches)
** All goals are successfully discharged.
**> QED *** WC1check-ty
--> ****************************************************************
--> 練習問題5.3 解答例終了
--> ****************************************************************
--> ****************************************************************
--> 練習問題5.4 [到達帰納条件ex] 解答例開始
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> ----------------------------------------------------------------
--> WC1check-ex: module for checking wc1 on EXtr
--> ----------------------------------------------------------------
-- defining module WC1check-ex
--> ================================================================
--> check (wc1check-ex = true)
--> ----------------------------------------------------------------
** Beginning a new proof in WC1check-ex
:goal { ** root -----------------------------------------
-- context module: WC1check-ex
-- sentence to be proved
eq wc1check-ex = true .
}
** Initial goal (root) is generated. **
sc=em defined as :csp{eq sc = empS . eq sc = (ac1 sc1) . }
sc1=e defined as :csp{eq sc1 = empS . eq sc1 = (ac2 sc2) . }
a=ac1 defined as :csp{eq a = ac1 . eq (a =a ac1) = false . }
aa=ac1 defined as :csp{eq aa = ac1 . eq (aa =a ac1) = false . }
aa!q defined as :csp{eq (aa in (q->s q)) = true . eq (aa in (q->s q)) = false . }
aa@sw defined as :csp{eq sw = (aa sw1) . eq (aa in sw) = false . }
[sc=em]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq wc1check-ex = true
[RD-] discharged goal "1".
[sc1=e]=> :goal{1}
[RD-]=> :goal{1}
[a=ac1]=> :goal{1}
[RD-]=> :goal{1}
[aa=ac1]=> :goal{1}
[RD-]=> :goal{1}
[aa!q]=> :goal{1}
[RD-]=> :goal{1}
[aa@sw]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> ((a in sc1) xor ((a =a ac1) xor ((a =a ac1) and (a in sc1)))),
SS:State |-> ([ q r (a sr) w sw c ((ac1 sc1) -as a) ]), A:Aid |-> a, Q:Aq |-> q,
Sr:As |-> sr, Sc:As |-> (ac1 sc1), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (ac1 sc1) ]) => (
[ q r (a sr) w sw c ((ac1 sc1) -as a) ])) % ((a in sc1) xor ((a =a ac1)
xor ((a =a ac1) and (a in sc1))))) % (((aa =a ac1) and ((aa in sc1) and ((aa
in sw) and inv(([ (a | q) r sr w sw c (ac1 sc1) ]))))) xor (((aa =a ac1)
and ((aa in sw) and inv(([ (a | q) r sr w sw c (ac1 sc1) ])))) xor (((aa
in sw) and inv(([ (a | q) r sr w sw c (ac1 sc1) ]))) xor (((aa in sc1)
and ((aa in sw) and inv(([ (a | q) r sr w sw c (ac1 sc1) ])))) xor (true
xor (((aa in sc1) and ((aa =a ac1) and ((aa in sw) and (inv(([ (a | q) r sr
w sw c (ac1 sc1) ])) and ((#daq((a | q),aa) + (#daq((a | q),aa) + (#daq((a
| q),aa) + (# sr)))) > (s (#daq(q,aa) + (#daq(q,aa) + (#daq(q,aa) + ((if ((
# ((ac1 sc1) -as a)) = 0) then (s 0) else 0 fi) + (# sr))))))))))) xor ((inv((
[ (a | q) r sr w sw c (ac1 sc1) ])) and ((aa in sw) and ((#daq((a | q),aa)
+ (#daq((a | q),aa) + (#daq((a | q),aa) + (# sr)))) > (s (#daq(q,aa) + (#daq(q,aa)
+ (#daq(q,aa) + ((if ((# ((ac1 sc1) -as a)) = 0) then (s 0) else 0 fi) + (
# sr))))))))) xor (((aa =a ac1) and ((aa in sw) and (inv(([ (a | q) r sr
w sw c (ac1 sc1) ])) and ((#daq((a | q),aa) + ((# sr) + (#daq((a | q),aa)
+ #daq((a | q),aa)))) > (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ (if ((# ((ac1 sc1) -as a)) = 0) then (s 0) else 0 fi)))))))))) xor (inv((
[ (a | q) r sr w sw c (ac1 sc1) ])) and ((aa in sw) and ((aa in sc1) and (((
# sr) + (#daq((a | q),aa) + (#daq((a | q),aa) + #daq((a | q),aa)))) > (s ((
# sr) + (#daq(q,aa) + ((if ((# ((ac1 sc1) -as a)) = 0) then (s 0) else 0
fi) + (#daq(q,aa) + #daq(q,aa))))))))))))))))))):Info
{ CC:Bool |-> ((a in sc1) xor ((a =a ac1) xor ((a =a ac1) and (a in sc1)))),
SS:State |-> ([ q r (a sr) w sw c ((ac1 sc1) -as a) ]), A:Aid |-> a, Q:Aq |-> q,
Sr:As |-> sr, Sc:As |-> (ac1 sc1), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (ac1 sc1) ]) => (
[ q r (a sr) w sw c ((ac1 sc1) -as a) ])) % ((a in sc1) xor ((a =a ac1)
xor ((a =a ac1) and (a in sc1))))) % (((aa =a ac1) and ((aa in sc1) and ((aa
in sw) and inv(([ (a | q) r sr w sw c (ac1 sc1) ]))))) xor (((aa =a ac1)
and ((aa in sw) and inv(([ (a | q) r sr w sw c (ac1 sc1) ])))) xor (((aa
in sw) and inv(([ (a | q) r sr w sw c (ac1 sc1) ]))) xor (((aa in sc1)
and ((aa in sw) and inv(([ (a | q) r sr w sw c (ac1 sc1) ])))) xor (true
xor (((aa in sc1) and ((aa =a ac1) and ((aa in sw) and (inv(([ (a | q) r sr
w sw c (ac1 sc1) ])) and ((#daq((a | q),aa) + (#daq((a | q),aa) + (#daq((a
| q),aa) + (# sr)))) > (s (#daq(q,aa) + (#daq(q,aa) + (#daq(q,aa) + ((if ((
# ((ac1 sc1) -as a)) = 0) then (s 0) else 0 fi) + (# sr))))))))))) xor ((inv((
[ (a | q) r sr w sw c (ac1 sc1) ])) and ((aa in sw) and ((#daq((a | q),aa)
+ (#daq((a | q),aa) + (#daq((a | q),aa) + (# sr)))) > (s (#daq(q,aa) + (#daq(q,aa)
+ (#daq(q,aa) + ((if ((# ((ac1 sc1) -as a)) = 0) then (s 0) else 0 fi) + (
# sr))))))))) xor (((aa =a ac1) and ((aa in sw) and (inv(([ (a | q) r sr
w sw c (ac1 sc1) ])) and ((#daq((a | q),aa) + ((# sr) + (#daq((a | q),aa)
+ #daq((a | q),aa)))) > (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ (if ((# ((ac1 sc1) -as a)) = 0) then (s 0) else 0 fi)))))))))) xor (inv((
[ (a | q) r sr w sw c (ac1 sc1) ])) and ((aa in sw) and ((aa in sc1) and (((
# sr) + (#daq((a | q),aa) + (#daq((a | q),aa) + #daq((a | q),aa)))) > (s ((
# sr) + (#daq(q,aa) + ((if ((# ((ac1 sc1) -as a)) = 0) then (s 0) else 0
fi) + (#daq(q,aa) + #daq(q,aa))))))))))))))))))):Info
[sc1=e]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
{ CC:Bool |-> (a =a ac1), SS:State |-> ([ q r (a sr) w sw c (ac1 -as a)
]), A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c ac1 ]) => ([ q r (a sr)
w sw c (ac1 -as a) ])) % (a =a ac1)) % (((aa in sw) and inv(([ (a | q) r sr
w sw c ac1 ]))) xor (((aa =a ac1) and ((aa in sw) and inv(([ (a | q) r sr
w sw c ac1 ])))) xor (true xor ((inv(([ (a | q) r sr w sw c ac1 ])) and ((aa
in sw) and ((#daq((a | q),aa) + ((# sr) + (#daq((a | q),aa) + #daq((a | q),aa))))
> (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + (#daq(q,aa) + (if ((# (ac1 -as a))
= 0) then (s 0) else 0 fi))))))))) xor ((aa =a ac1) and ((aa in sw) and (inv((
[ (a | q) r sr w sw c ac1 ])) and ((#daq((a | q),aa) + ((# sr) + (#daq((a
| q),aa) + #daq((a | q),aa)))) > (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ (if ((# (ac1 -as a)) = 0) then (s 0) else 0 fi))))))))))))))):Info
{ CC:Bool |-> (a =a ac1), SS:State |-> ([ q r (a sr) w sw c (ac1 -as a)
]), A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c ac1 ]) => ([ q r (a sr)
w sw c (ac1 -as a) ])) % (a =a ac1)) % (((aa in sw) and inv(([ (a | q) r sr
w sw c ac1 ]))) xor (((aa =a ac1) and ((aa in sw) and inv(([ (a | q) r sr
w sw c ac1 ])))) xor (true xor ((inv(([ (a | q) r sr w sw c ac1 ])) and ((aa
in sw) and ((#daq((a | q),aa) + ((# sr) + (#daq((a | q),aa) + #daq((a | q),aa))))
> (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + (#daq(q,aa) + (if ((# (ac1 -as a))
= 0) then (s 0) else 0 fi))))))))) xor ((aa =a ac1) and ((aa in sw) and (inv((
[ (a | q) r sr w sw c ac1 ])) and ((#daq((a | q),aa) + ((# sr) + (#daq((a
| q),aa) + #daq((a | q),aa)))) > (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ (if ((# (ac1 -as a)) = 0) then (s 0) else 0 fi))))))))))))))):Info
[a=ac1]=> :goal{2-1}
** Generated 2 goals
[RD-]=> :goal{2-1-1}
{ CC:Bool |-> true, SS:State |-> ([ q r (ac1 sr) w sw c empS ]), A:Aid |-> ac1,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (ac1 | q) r sr w sw c ac1 ]) => ([ q
r (ac1 sr) w sw c empS ])) % true) % (((aa in sw) and inv(([ (ac1 | q) r sr
w sw c ac1 ]))) xor (((aa =a ac1) and ((aa in sw) and inv(([ (ac1 | q) r sr
w sw c ac1 ])))) xor (true xor (((aa in sw) and (((#daq((ac1 | q),aa) + ((
# sr) + (#daq((ac1 | q),aa) + #daq((ac1 | q),aa)))) > (s (s ((# sr) + (#daq(q,aa)
+ (#daq(q,aa) + #daq(q,aa))))))) and ((aa =a ac1) and inv(([ (ac1 | q) r sr
w sw c ac1 ]))))) xor ((aa in sw) and (((#daq((ac1 | q),aa) + ((# sr) + (#daq((ac1
| q),aa) + #daq((ac1 | q),aa)))) > (s (s ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ #daq(q,aa))))))) and inv(([ (ac1 | q) r sr w sw c ac1 ]))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ q r (ac1 sr) w sw c empS ]), A:Aid |-> ac1,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (ac1 | q) r sr w sw c ac1 ]) => ([ q
r (ac1 sr) w sw c empS ])) % true) % (((aa in sw) and inv(([ (ac1 | q) r sr
w sw c ac1 ]))) xor (((aa =a ac1) and ((aa in sw) and inv(([ (ac1 | q) r sr
w sw c ac1 ])))) xor (true xor (((aa in sw) and (((#daq((ac1 | q),aa) + ((
# sr) + (#daq((ac1 | q),aa) + #daq((ac1 | q),aa)))) > (s (s ((# sr) + (#daq(q,aa)
+ (#daq(q,aa) + #daq(q,aa))))))) and ((aa =a ac1) and inv(([ (ac1 | q) r sr
w sw c ac1 ]))))) xor ((aa in sw) and (((#daq((ac1 | q),aa) + ((# sr) + (#daq((ac1
| q),aa) + #daq((ac1 | q),aa)))) > (s (s ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ #daq(q,aa))))))) and inv(([ (ac1 | q) r sr w sw c ac1 ]))))))))):Info
[aa=ac1]=> :goal{2-1-1}
** Generated 2 goals
[RD-]=> :goal{2-1-1-1}
[RD-] discharged:
eq wc1check-ex = true
[RD-] discharged goal "2-1-1-1".
[aa!q]=> :goal{2-1-1-1}
[RD-]=> :goal{2-1-1-1}
[aa@sw]=> :goal{2-1-1-1}
[RD-]=> :goal{2-1-1-1}
[RD-]=> :goal{2-1-1-2}
{ CC:Bool |-> true, SS:State |-> ([ q r (ac1 sr) w sw c empS ]), A:Aid |-> ac1,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (ac1 | q) r sr w sw c ac1 ]) => ([ q
r (ac1 sr) w sw c empS ])) % true) % (((aa in sw) and inv(([ (ac1 | q) r sr
w sw c ac1 ]))) xor (true xor ((aa in sw) and (inv(([ (ac1 | q) r sr w sw
c ac1 ])) and ((#daq((ac1 | q),aa) + (#daq((ac1 | q),aa) + (#daq((ac1 | q),aa)
+ (# sr)))) > (s (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + #daq(q,aa)))))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ q r (ac1 sr) w sw c empS ]), A:Aid |-> ac1,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (ac1 | q) r sr w sw c ac1 ]) => ([ q
r (ac1 sr) w sw c empS ])) % true) % (((aa in sw) and inv(([ (ac1 | q) r sr
w sw c ac1 ]))) xor (true xor ((aa in sw) and (inv(([ (ac1 | q) r sr w sw
c ac1 ])) and ((#daq((ac1 | q),aa) + (#daq((ac1 | q),aa) + (#daq((ac1 | q),aa)
+ (# sr)))) > (s (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + #daq(q,aa)))))))))))):Info
[aa!q]=> :goal{2-1-1-2}
** Generated 2 goals
[RD-]=> :goal{2-1-1-2-1}
[RD-] discharged:
eq wc1check-ex = true
[RD-] discharged goal "2-1-1-2-1".
[aa@sw]=> :goal{2-1-1-2-1}
[RD-]=> :goal{2-1-1-2-1}
[RD-]=> :goal{2-1-1-2-2}
{ CC:Bool |-> true, SS:State |-> ([ q r (ac1 sr) w sw c empS ]), A:Aid |-> ac1,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (ac1 | q) r sr w sw c ac1 ]) => ([ q
r (ac1 sr) w sw c empS ])) % true) % (((aa in sw) and inv(([ (ac1 | q) r sr
w sw c ac1 ]))) xor (true xor ((aa in sw) and (inv(([ (ac1 | q) r sr w sw
c ac1 ])) and ((#daq((ac1 | q),aa) + (#daq((ac1 | q),aa) + (#daq((ac1 | q),aa)
+ (# sr)))) > (s (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + #daq(q,aa)))))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ q r (ac1 sr) w sw c empS ]), A:Aid |-> ac1,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (ac1 | q) r sr w sw c ac1 ]) => ([ q
r (ac1 sr) w sw c empS ])) % true) % (((aa in sw) and inv(([ (ac1 | q) r sr
w sw c ac1 ]))) xor (true xor ((aa in sw) and (inv(([ (ac1 | q) r sr w sw
c ac1 ])) and ((#daq((ac1 | q),aa) + (#daq((ac1 | q),aa) + (#daq((ac1 | q),aa)
+ (# sr)))) > (s (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + #daq(q,aa)))))))))))):Info
[aa@sw]=> :goal{2-1-1-2-2}
** Generated 2 goals
[RD-]=> :goal{2-1-1-2-2-1}
[RD-] discharged:
eq wc1check-ex = true
[RD-] discharged goal "2-1-1-2-2-1".
[RD-]=> :goal{2-1-1-2-2-2}
[RD-] discharged:
eq wc1check-ex = true
[RD-] discharged goal "2-1-1-2-2-2".
[RD-]=> :goal{2-1-2}
[RD-] discharged:
eq wc1check-ex = true
[RD-] discharged goal "2-1-2".
[aa=ac1]=> :goal{2-1-2}
[RD-]=> :goal{2-1-2}
[aa!q]=> :goal{2-1-2}
[RD-]=> :goal{2-1-2}
[aa@sw]=> :goal{2-1-2}
[RD-]=> :goal{2-1-2}
[RD-]=> :goal{2-2}
[RD-] discharged:
eq wc1check-ex = true
[RD-] discharged goal "2-2".
[a=ac1]=> :goal{2-2}
[RD-]=> :goal{2-2}
[aa=ac1]=> :goal{2-2}
[RD-]=> :goal{2-2}
[aa!q]=> :goal{2-2}
[RD-]=> :goal{2-2}
[aa@sw]=> :goal{2-2}
[RD-]=> :goal{2-2}
(consumed 4.1075 sec, including 182732 rewrites + 6478726 matches)
** All goals are successfully discharged.
**> QED ** WC1check-ex
--> ****************************************************************
--> 練習問題5.4 解答例終了
--> ****************************************************************
--> ****************************************************************
--> Verification conditions wc2 for wc property
--> (for-all state s:State and data d:Data):
--> (inv(s) and p(s,d) and not(q(s,d)))
--> implies
--> (there-exits transition (s->s'):(State,State))
--> ****************************************************************
--> ----------------------------------------------------------------
--> CHECKwc2 -- module for defining check-wc2 for the condition wc2
--> ----------------------------------------------------------------
-- defining module CHECKwc2
--> ----------------------------------------------------------------
--> WCcheck2 -- module for checking condition wc2
--> ----------------------------------------------------------------
-- defining module WC2check
--> ================================================================
--> check (wc2Check = true)
--> ----------------------------------------------------------------
** Beginning a new proof in WC2check
:goal { ** root -----------------------------------------
-- context module: WC2check
-- sentence to be proved
eq wc2check = true .
}
** Initial goal (root) is generated. **
sr=em defined as :csp{eq sr = empS . eq sr = (ar1 sr1) . }
q=nil defined as :csp{eq q = nilQ . eq q = (a1 | q1) . }
a1@sw defined as :csp{eq sw = (a1 sw-a1) . eq (a1 in sw) = false . }
a1@sc defined as :csp{eq sc = (a1 sc-a1) . eq (a1 in sc) = false . }
[sr=em]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[q=nil]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[RD-] discharged:
eq wc2check = true
[RD-] discharged goal "1-1".
[a1@sw]=> :goal{1-1}
[RD-]=> :goal{1-1}
[a1@sc]=> :goal{1-1}
[RD-]=> :goal{1-1}
[RD-]=> :goal{1-2}
[a1@sw]=> :goal{1-2}
** Generated 2 goals
[RD-]=> :goal{1-2-1}
[RD-] discharged:
eq wc2check = true
[RD-] discharged goal "1-2-1".
[a1@sc]=> :goal{1-2-1}
[RD-]=> :goal{1-2-1}
[RD-]=> :goal{1-2-2}
[a1@sc]=> :goal{1-2-2}
** Generated 2 goals
[RD-]=> :goal{1-2-2-1}
[RD-] discharged:
eq wc2check = true
[RD-] discharged goal "1-2-2-1".
[RD-]=> :goal{1-2-2-2}
[RD-] discharged:
eq wc2check = true
[RD-] discharged goal "1-2-2-2".
[RD-]=> :goal{2}
[RD-] discharged:
eq wc2check = true
[RD-] discharged goal "2".
[q=nil]=> :goal{2}
[RD-]=> :goal{2}
[a1@sw]=> :goal{2}
[RD-]=> :goal{2}
[a1@sc]=> :goal{2}
[RD-]=> :goal{2}
(consumed 0.1072 sec, including 11589 rewrites + 113195 matches)
** All goals are successfully discharged.
**> QED *** WC2check
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ****************************************************************
--> 練習問題5.3 [到達帰納条件ty] 解答例
--> ****************************************************************
--> ****************************************************************
--> 練習問題5.4 [到達帰納条件ex] 解答例
--> ****************************************************************
--> ****************************************************************
--> 5.10.1 補題モジュールDAQ-lm
--> ****************************************************************
--> ****************************************************************
--> 5.11 継続到達条件の証明スコア
--> ****************************************************************
--> ****************************************************************
--> 5.11.1 補題モジュールSTATE-lm
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
WC2check(X.STATE)> [Leaving CafeOBJ]
========================================
Running: check-cnr.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:17 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/check-cnr.cafe
--> ****************************************************************
--> 5.7 検索述語による遷移の検索
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
-- defining module CNR
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> module for defining check-cnr
--> ----------------------------------------------------------------
-- defining module CHECKcnr
-- reading in file : rwl
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/rwl.cafe
-- defining module! RWL
-- done reading in file: rwl
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
CafeOBJ> [Leaving CafeOBJ]
========================================
Running: pnat.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:17 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/pnat.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
--> PNAT with _+_ and _*_
--> ----------------------------------------------------------------
-- defining module! PNAT
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
-- defining module! PNAT=
-- defining module! PNAT+ac
-- defining module! PNAT*ac
--> ----------------------------------------------------------------
--> 大小述語_>_が定義されたPNAT
--> ----------------------------------------------------------------
-- defining module! PNAT*ac>
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
CafeOBJ> [Leaving CafeOBJ]
========================================
Running: qlock-ex-tr-ss.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:17 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/qlock-ex-tr-ss.cafe
--> ****************************************************************
--> 5.3 検索述語によるシミュレーション
--> 5.4 検索述語による反例発見
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-ex-tr-sys.cafe
--> ****************************************************************
--> 5.4 検索述語による反例発見
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-tr-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 待ち行列の最後に入る状態遷移 (WT: want transition)
--> ----------------------------------------------------------------
-- defining module! WTtr
-- reading in file : rwl
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/rwl.cafe
-- defining module! RWL
-- done reading in file: rwl
--> ----------------------------------------------------------------
--> 待ち行列の先頭にきたら共有資源を使う状態遷移 (TY: try transition)
--> ----------------------------------------------------------------
-- defining module! TYtr
--> ----------------------------------------------------------------
--> 共有資源を使い終わったら待ち行列を離れる状態遷移 (EX: exit transition)
--> ----------------------------------------------------------------
-- defining module! EXtr
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> want transition; arbitrary position but the top
--> ----------------------------------------------------------------
-- defining module! WTATtr
--> ----------------------------------------------------------------
--> want transition; arbitrary position
--> ----------------------------------------------------------------
-- defining module! WTAtr
--> ----------------------------------------------------------------
--> swap the position but the top
--> ----------------------------------------------------------------
-- defining module! SWPTtr
--> ----------------------------------------------------------------
--> swap the position
--> ----------------------------------------------------------------
-- defining module! SWPtr
--> ----------------------------------------------------------------
--> drop out from the queue
--> ----------------------------------------------------------------
-- defining module! DPtr
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-mx-inv-prp.cafe
--> ****************************************************************
--> 5.3 検索述語によるシミュレーション
--> 5.5 遷移システムの不変特性と帰納不変特性
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 相互排除性述語(ゴール述語)mx_:共用資源を使用中の実行主体はたかだか一つ
--> ----------------------------------------------------------------
-- defining module! MXprp
--> ----------------------------------------------------------------
--> hq=c_:共用資源を使用中であるであればキューの先頭要素である
--> ----------------------------------------------------------------
-- defining module! HQ=Cprp
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体が自然数で表され遷移規則wt,ty,exで遷移するシステムをオープン
--> ----------------------------------------------------------------
-- reading in file : nat
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/nat.cafe
-- defining module! NAT
-- reading in file : nznat
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/nznat.cafe
-- defining module! NZNAT
-- done reading in file: nznat
-- done reading in file: nat
-- opening module WTtr + TYtr + EXtr(X <= NAT{sort Aid -> Nat, op A1:Aid =a A2:Aid -> A1:Nat == A2:Nat })
--> ================================================================
--> 2つの実行主体を持つシステムが到達可能な全ての状態
--> ----------------------------------------------------------------
-- reduce in %WTtr + TYtr + EXtr(X <= NAT{ ... }) : (([ nilQ r (1 2) w empS c empS ]) = ( * , * ) =>* S:State):Bool
** Found [state 0-0] ([ nilQ r (2 1) w empS c empS ]):State
-- target: S:State
{ S:State |-> ([ nilQ r (2 1) w empS c empS ]) }
** Found [state 0-1] ([ 2 r 1 w 2 c empS ]):State
-- target: S:State
{ S:State |-> ([ 2 r 1 w 2 c empS ]), Sr:As |-> 1, Ar:Nat |-> 2, Q:Aq |-> nilQ, Sc:As |-> empS, Sw:As |-> empS }
** Found [state 0-2] ([ 1 r 2 w 1 c empS ]):State
-- target: S:State
{ S:State |-> ([ 1 r 2 w 1 c empS ]), Sr:As |-> 2, Ar:Nat |-> 1, Q:Aq |-> nilQ, Sc:As |-> empS, Sw:As |-> empS }
** Found [state 0-3] ([ (2 | 1) r empS w (2 1) c empS ]):State
-- target: S:State
{ S:State |-> ([ (2 | 1) r empS w (2 1) c empS ]), Sr:As |-> empS, Ar:Nat |-> 1, Q:Aq |-> 2, Sc:As |-> empS, Sw:As |-> 2 }
** Found [state 0-4] ([ 2 r 1 w empS c 2 ]):State
-- target: S:State
{ S:State |-> ([ 2 r 1 w empS c 2 ]), Sw:As |-> empS, A:Nat |-> 2, Q:Aq |-> nilQ, Sr:As |-> 1, Sc:As |-> empS }
** Found [state 0-5] ([ (1 | 2) r empS w (1 2) c empS ]):State
-- target: S:State
{ S:State |-> ([ (1 | 2) r empS w (1 2) c empS ]), Sr:As |-> empS, Ar:Nat |-> 2, Q:Aq |-> 1, Sc:As |-> empS, Sw:As |-> 1 }
** Found [state 0-6] ([ 1 r 2 w empS c 1 ]):State
-- target: S:State
{ S:State |-> ([ 1 r 2 w empS c 1 ]), Sw:As |-> empS, A:Nat |-> 1, Q:Aq |-> nilQ, Sr:As |-> 2, Sc:As |-> empS }
** Found [state 0-7] ([ (2 | 1) r empS w 1 c 2 ]):State
-- target: S:State
{ S:State |-> ([ (2 | 1) r empS w 1 c 2 ]), Sw:As |-> 1, A:Nat |-> 2, Q:Aq |-> 1, Sr:As |-> empS, Sc:As |-> empS }
** Found [state 0-8] ([ (1 | 2) r empS w 2 c 1 ]):State
-- target: S:State
{ S:State |-> ([ (1 | 2) r empS w 2 c 1 ]), Sw:As |-> 2, A:Nat |-> 1, Q:Aq |-> 2, Sr:As |-> empS, Sc:As |-> empS }
** No more possible transitions.
(true):Bool
(0.0001 sec for parse, 0.0010 sec for 63 rewrites + 180 matches, 18 memo hits)
--> ================================================================
--> 3つの実行主体を持つシステムが到達可能な全ての状態
--> ----------------------------------------------------------------
-- reduce in %WTtr + TYtr + EXtr(X <= NAT{ ... }) : (([ nilQ r (1 (2 3)) w empS c empS ]) = ( * , * ) =>* S:State):Bool
** Found [state 0-0] ([ nilQ r (2 (3 1)) w empS c empS ]):State
-- target: S:State
{ S:State |-> ([ nilQ r (2 (3 1)) w empS c empS ]) }
** Found [state 0-1] ([ 2 r (1 3) w 2 c empS ]):State
-- target: S:State
{ S:State |-> ([ 2 r (1 3) w 2 c empS ]), Sr:As |-> (1 3), Ar:Nat |-> 2, Q:Aq |-> nilQ, Sc:As |-> empS, Sw:As |-> empS }
** Found [state 0-2] ([ 3 r (1 2) w 3 c empS ]):State
-- target: S:State
{ S:State |-> ([ 3 r (1 2) w 3 c empS ]), Sr:As |-> (1 2), Ar:Nat |-> 3, Q:Aq |-> nilQ, Sc:As |-> empS, Sw:As |-> empS }
** Found [state 0-3] ([ 1 r (3 2) w 1 c empS ]):State
-- target: S:State
{ S:State |-> ([ 1 r (3 2) w 1 c empS ]), Sr:As |-> (3 2), Ar:Nat |-> 1, Q:Aq |-> nilQ, Sc:As |-> empS, Sw:As |-> empS }
** Found [state 0-4] ([ (2 | 1) r 3 w (2 1) c empS ]):State
-- target: S:State
{ S:State |-> ([ (2 | 1) r 3 w (2 1) c empS ]), Sr:As |-> 3, Ar:Nat |-> 1, Q:Aq |-> 2, Sc:As |-> empS, Sw:As |-> 2 }
** Found [state 0-5] ([ (2 | 3) r 1 w (2 3) c empS ]):State
-- target: S:State
{ S:State |-> ([ (2 | 3) r 1 w (2 3) c empS ]), Sr:As |-> 1, Ar:Nat |-> 3, Q:Aq |-> 2, Sc:As |-> empS, Sw:As |-> 2 }
** Found [state 0-6] ([ 2 r (3 1) w empS c 2 ]):State
-- target: S:State
{ S:State |-> ([ 2 r (3 1) w empS c 2 ]), Sw:As |-> empS, A:Nat |-> 2, Q:Aq |-> nilQ, Sr:As |-> (3 1), Sc:As |-> empS }
** Found [state 0-7] ([ (3 | 1) r 2 w (3 1) c empS ]):State
-- target: S:State
{ S:State |-> ([ (3 | 1) r 2 w (3 1) c empS ]), Sr:As |-> 2, Ar:Nat |-> 1, Q:Aq |-> 3, Sc:As |-> empS, Sw:As |-> 3 }
** Found [state 0-8] ([ (3 | 2) r 1 w (3 2) c empS ]):State
-- target: S:State
{ S:State |-> ([ (3 | 2) r 1 w (3 2) c empS ]), Sr:As |-> 1, Ar:Nat |-> 2, Q:Aq |-> 3, Sc:As |-> empS, Sw:As |-> 3 }
** Found [state 0-9] ([ 3 r (2 1) w empS c 3 ]):State
-- target: S:State
{ S:State |-> ([ 3 r (2 1) w empS c 3 ]), Sw:As |-> empS, A:Nat |-> 3, Q:Aq |-> nilQ, Sr:As |-> (2 1), Sc:As |-> empS }
** Found [state 0-10] ([ (1 | 3) r 2 w (1 3) c empS ]):State
-- target: S:State
{ S:State |-> ([ (1 | 3) r 2 w (1 3) c empS ]), Sr:As |-> 2, Ar:Nat |-> 3, Q:Aq |-> 1, Sc:As |-> empS, Sw:As |-> 1 }
** Found [state 0-11] ([ (1 | 2) r 3 w (1 2) c empS ]):State
-- target: S:State
{ S:State |-> ([ (1 | 2) r 3 w (1 2) c empS ]), Sr:As |-> 3, Ar:Nat |-> 2, Q:Aq |-> 1, Sc:As |-> empS, Sw:As |-> 1 }
** Found [state 0-12] ([ 1 r (2 3) w empS c 1 ]):State
-- target: S:State
{ S:State |-> ([ 1 r (2 3) w empS c 1 ]), Sw:As |-> empS, A:Nat |-> 1, Q:Aq |-> nilQ, Sr:As |-> (2 3), Sc:As |-> empS }
** Found [state 0-13] ([ ((2 | 1) | 3) r empS w (2 (1 3)) c empS ]):State
-- target: S:State
{ S:State |-> ([ ((2 | 1) | 3) r empS w (2 (1 3)) c empS ]), Sr:As |-> empS, Ar:Nat |-> 3, Q:Aq |-> (2 | 1), Sc:As |-> empS, Sw:As |-> (1 2) }
** Found [state 0-14] ([ (2 | 1) r 3 w 1 c 2 ]):State
-- target: S:State
{ S:State |-> ([ (2 | 1) r 3 w 1 c 2 ]), Sw:As |-> 1, A:Nat |-> 2, Q:Aq |-> 1, Sr:As |-> 3, Sc:As |-> empS }
** Found [state 0-15] ([ ((2 | 3) | 1) r empS w (2 (3 1)) c empS ]):State
-- target: S:State
{ S:State |-> ([ ((2 | 3) | 1) r empS w (2 (3 1)) c empS ]), Sr:As |-> empS, Ar:Nat |-> 1, Q:Aq |-> (2 | 3), Sc:As |-> empS, Sw:As |-> (3 2) }
** Found [state 0-16] ([ (2 | 3) r 1 w 3 c 2 ]):State
-- target: S:State
{ S:State |-> ([ (2 | 3) r 1 w 3 c 2 ]), Sw:As |-> 3, A:Nat |-> 2, Q:Aq |-> 3, Sr:As |-> 1, Sc:As |-> empS }
** Found [state 0-17] ([ ((3 | 1) | 2) r empS w (3 (1 2)) c empS ]):State
-- target: S:State
{ S:State |-> ([ ((3 | 1) | 2) r empS w (3 (1 2)) c empS ]), Sr:As |-> empS, Ar:Nat |-> 2, Q:Aq |-> (3 | 1), Sc:As |-> empS, Sw:As |-> (1 3) }
** Found [state 0-18] ([ (3 | 1) r 2 w 1 c 3 ]):State
-- target: S:State
{ S:State |-> ([ (3 | 1) r 2 w 1 c 3 ]), Sw:As |-> 1, A:Nat |-> 3, Q:Aq |-> 1, Sr:As |-> 2, Sc:As |-> empS }
** Found [state 0-19] ([ ((3 | 2) | 1) r empS w (3 (2 1)) c empS ]):State
-- target: S:State
{ S:State |-> ([ ((3 | 2) | 1) r empS w (3 (2 1)) c empS ]), Sr:As |-> empS, Ar:Nat |-> 1, Q:Aq |-> (3 | 2), Sc:As |-> empS, Sw:As |-> (2 3) }
** Found [state 0-20] ([ (3 | 2) r 1 w 2 c 3 ]):State
-- target: S:State
{ S:State |-> ([ (3 | 2) r 1 w 2 c 3 ]), Sw:As |-> 2, A:Nat |-> 3, Q:Aq |-> 2, Sr:As |-> 1, Sc:As |-> empS }
** Found [state 0-21] ([ ((1 | 3) | 2) r empS w (1 (3 2)) c empS ]):State
-- target: S:State
{ S:State |-> ([ ((1 | 3) | 2) r empS w (1 (3 2)) c empS ]), Sr:As |-> empS, Ar:Nat |-> 2, Q:Aq |-> (1 | 3), Sc:As |-> empS, Sw:As |-> (3 1) }
** Found [state 0-22] ([ (1 | 3) r 2 w 3 c 1 ]):State
-- target: S:State
{ S:State |-> ([ (1 | 3) r 2 w 3 c 1 ]), Sw:As |-> 3, A:Nat |-> 1, Q:Aq |-> 3, Sr:As |-> 2, Sc:As |-> empS }
** Found [state 0-23] ([ ((1 | 2) | 3) r empS w (1 (2 3)) c empS ]):State
-- target: S:State
{ S:State |-> ([ ((1 | 2) | 3) r empS w (1 (2 3)) c empS ]), Sr:As |-> empS, Ar:Nat |-> 3, Q:Aq |-> (1 | 2), Sc:As |-> empS, Sw:As |-> (2 1) }
** Found [state 0-24] ([ (1 | 2) r 3 w 2 c 1 ]):State
-- target: S:State
{ S:State |-> ([ (1 | 2) r 3 w 2 c 1 ]), Sw:As |-> 2, A:Nat |-> 1, Q:Aq |-> 2, Sr:As |-> 3, Sc:As |-> empS }
** Found [state 0-25] ([ (2 | (1 | 3)) r empS w (3 1) c 2 ]):State
-- target: S:State
{ S:State |-> ([ (2 | (1 | 3)) r empS w (3 1) c 2 ]), Sw:As |-> (3 1), A:Nat |-> 2, Q:Aq |-> (1 | 3), Sr:As |-> empS, Sc:As |-> empS }
** Found [state 0-26] ([ (2 | (3 | 1)) r empS w (1 3) c 2 ]):State
-- target: S:State
{ S:State |-> ([ (2 | (3 | 1)) r empS w (1 3) c 2 ]), Sw:As |-> (1 3), A:Nat |-> 2, Q:Aq |-> (3 | 1), Sr:As |-> empS, Sc:As |-> empS }
** Found [state 0-27] ([ (3 | (1 | 2)) r empS w (2 1) c 3 ]):State
-- target: S:State
{ S:State |-> ([ (3 | (1 | 2)) r empS w (2 1) c 3 ]), Sw:As |-> (2 1), A:Nat |-> 3, Q:Aq |-> (1 | 2), Sr:As |-> empS, Sc:As |-> empS }
** Found [state 0-28] ([ (3 | (2 | 1)) r empS w (1 2) c 3 ]):State
-- target: S:State
{ S:State |-> ([ (3 | (2 | 1)) r empS w (1 2) c 3 ]), Sw:As |-> (1 2), A:Nat |-> 3, Q:Aq |-> (2 | 1), Sr:As |-> empS, Sc:As |-> empS }
** Found [state 0-29] ([ (1 | (3 | 2)) r empS w (2 3) c 1 ]):State
-- target: S:State
{ S:State |-> ([ (1 | (3 | 2)) r empS w (2 3) c 1 ]), Sw:As |-> (2 3), A:Nat |-> 1, Q:Aq |-> (3 | 2), Sr:As |-> empS, Sc:As |-> empS }
** Found [state 0-30] ([ (1 | (2 | 3)) r empS w (3 2) c 1 ]):State
-- target: S:State
{ S:State |-> ([ (1 | (2 | 3)) r empS w (3 2) c 1 ]), Sw:As |-> (3 2), A:Nat |-> 1, Q:Aq |-> (2 | 3), Sr:As |-> empS, Sc:As |-> empS }
** No more possible transitions.
(true):Bool
(0.0001 sec for parse, 0.0041 sec for 190 rewrites + 1280 matches, 51 memo hits)
--> ================================================================
--> 4つの実行主体を持つシステムが到達可能な全ての状態
--> ----------------------------------------------------------------
--> 129状態
--> ================================================================
--> 5つの実行主体を持つシステムが到達可能な全ての状態
--> ----------------------------------------------------------------
--> 651状態
--> ================================================================
--> 相互排除性が成り立たない
--> 遷移規則wt,ty,exにより到達可能な状態の検索
--> ----------------------------------------------------------------
-- opening module WTtr + TYtr + MXprp + EXtr(X <= NAT{sort Aid -> Nat, op A1:Aid =a A2:Aid -> A1:Nat == A2:Nat })
-- reduce in %WTtr + TYtr + MXprp + EXtr(X <= NAT{ ... }) : (([ nilQ r (1 2) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** No more possible transitions.
(false):Bool
(0.0001 sec for parse, 0.0009 sec for 103 rewrites + 271 matches, 18 memo hits)
-- reduce in %WTtr + TYtr + MXprp + EXtr(X <= NAT{ ... }) : (([ nilQ r (1 (2 3)) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** No more possible transitions.
(false):Bool
(0.0001 sec for parse, 0.0036 sec for 329 rewrites + 1882 matches, 51 memo hits)
-- reduce in %WTtr + TYtr + MXprp + EXtr(X <= NAT{ ... }) : (([ nilQ r (4 (3 (1 2))) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** No more possible transitions.
(false):Bool
(0.0001 sec for parse, 0.0220 sec for 1305 rewrites + 15553 matches, 188 memo hits)
-- reduce in %WTtr + TYtr + MXprp + EXtr(X <= NAT{ ... }) : (([ nilQ r (3 (2 (4 (1 5)))) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** No more possible transitions.
(false):Bool
(0.0001 sec for parse, 0.1719 sec for 6465 rewrites + 147515 matches, 905 memo hits)
--> ================================================================
--> 相互排除性が成り立たない
--> 遷移規則wt,ty,ex,wtat,swpt,dpにより到達可能な状態の検索
--> ----------------------------------------------------------------
-- opening module WTtr + WTATtr + TYtr + SWPTtr + MXprp + EXtr + DPtr(X <= NAT{sort Aid -> Nat, op A1:Aid =a A2:Aid -> A1:Nat == A2:Nat })
-- reduce in %WTtr + WTATtr + TYtr + SWPTtr + MXprp + EXtr + DPtr(X <= NAT{ ... }) : (([ nilQ r (1 2) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** No more possible transitions.
(false):Bool
(0.0001 sec for parse, 0.0012 sec for 259 rewrites + 683 matches, 50 memo hits)
-- reduce in %WTtr + WTATtr + TYtr + SWPTtr + MXprp + EXtr + DPtr(X <= NAT{ ... }) : (([ nilQ r (1 (2 3)) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** No more possible transitions.
(false):Bool
(0.0001 sec for parse, 0.0059 sec for 1043 rewrites + 5032 matches, 195 memo hits)
-- reduce in %WTtr + WTATtr + TYtr + SWPTtr + MXprp + EXtr + DPtr(X <= NAT{ ... }) : (([ nilQ r (4 (3 (1 2))) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** No more possible transitions.
(false):Bool
(0.0001 sec for parse, 0.0495 sec for 5329 rewrites + 50105 matches, 1020 memo hits)
-- reduce in %WTtr + WTATtr + TYtr + SWPTtr + MXprp + EXtr + DPtr(X <= NAT{ ... }) : (([ nilQ r (3 (2 (4 (1 5)))) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** No more possible transitions.
(false):Bool
(0.0001 sec for parse, 0.5247 sec for 32995 rewrites + 597885 matches, 6485 memo hits)
--> ================================================================
--> 相互排除性が成り立たない
--> 遷移規則wt,ty,ex,wtaにより到達可能な状態の検索
--> ----------------------------------------------------------------
-- opening module WTtr + WTAtr + TYtr + MXprp + EXtr(X <= NAT{sort Aid -> Nat, op A1:Aid =a A2:Aid -> A1:Nat == A2:Nat })
-- reduce in %WTtr + WTAtr + TYtr + MXprp + EXtr(X <= NAT{ ... }) : (([ nilQ r (1 2) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** Found [state 0-11] ([ (1 | 2) r empS w empS c (2 1) ]):State
-- target: S:State
{ S:State |-> ([ (1 | 2) r empS w empS c (2 1) ]), Sw:As |-> empS, A:Nat |-> 1, Q:Aq |-> 2, Sr:As |-> empS, Sc:As |-> 2 }
** Found [state 0-12] ([ (2 | 1) r empS w empS c (1 2) ]):State
-- target: S:State
{ S:State |-> ([ (2 | 1) r empS w empS c (1 2) ]), Sw:As |-> empS, A:Nat |-> 2, Q:Aq |-> 1, Sr:As |-> empS, Sc:As |-> 1 }
** No more possible transitions.
(true):Bool
(0.0001 sec for parse, 0.0014 sec for 185 rewrites + 645 matches, 40 memo hits)
--> ================================================================
--> 相互排除性が成り立たない
--> 遷移規則wt,ty,ex,swpにより到達可能な状態の検索
--> ----------------------------------------------------------------
-- opening module WTtr + TYtr + SWPtr + MXprp + EXtr(X <= NAT{sort Aid -> Nat, op A1:Aid =a A2:Aid -> A1:Nat == A2:Nat })
-- reduce in %WTtr + TYtr + SWPtr + MXprp + EXtr(X <= NAT{ ... }) : (([ nilQ r (1 2) w empS c empS ]) = ( * , * ) =>* S:State suchThat (not (mx S))):Bool
** No more possible transitions.
(false):Bool
(0.0001 sec for parse, 0.0009 sec for 103 rewrites + 271 matches, 18 memo hits)
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
CafeOBJ> [Leaving CafeOBJ]
========================================
Running: qlock-ex-tr-sys.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:18 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/qlock-ex-tr-sys.cafe
--> ****************************************************************
--> 5.4 検索述語による反例発見
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-tr-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 待ち行列の最後に入る状態遷移 (WT: want transition)
--> ----------------------------------------------------------------
-- defining module! WTtr
-- reading in file : rwl
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/rwl.cafe
-- defining module! RWL
-- done reading in file: rwl
--> ----------------------------------------------------------------
--> 待ち行列の先頭にきたら共有資源を使う状態遷移 (TY: try transition)
--> ----------------------------------------------------------------
-- defining module! TYtr
--> ----------------------------------------------------------------
--> 共有資源を使い終わったら待ち行列を離れる状態遷移 (EX: exit transition)
--> ----------------------------------------------------------------
-- defining module! EXtr
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> want transition; arbitrary position but the top
--> ----------------------------------------------------------------
-- defining module! WTATtr
--> ----------------------------------------------------------------
--> want transition; arbitrary position
--> ----------------------------------------------------------------
-- defining module! WTAtr
--> ----------------------------------------------------------------
--> swap the position but the top
--> ----------------------------------------------------------------
-- defining module! SWPTtr
--> ----------------------------------------------------------------
--> swap the position
--> ----------------------------------------------------------------
-- defining module! SWPtr
--> ----------------------------------------------------------------
--> drop out from the queue
--> ----------------------------------------------------------------
-- defining module! DPtr
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
CafeOBJ> [Leaving CafeOBJ]
========================================
Running: qlock-init-prp.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:19 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/qlock-init-prp.cafe
--> ****************************************************************
--> 5.5 遷移システムの不変特性と帰納不変特性
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 初期状態述語
--> ----------------------------------------------------------------
-- defining module! INITprp
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
CafeOBJ> [Leaving CafeOBJ]
========================================
Running: qlock-mx-iinv-ps.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:19 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/qlock-mx-iinv-ps.cafe
--> ****************************************************************
--> 5.8 帰納不変条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./check-cnr.cafe
--> ****************************************************************
--> 5.7 検索述語による遷移の検索
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
-- defining module CNR
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> module for defining check-cnr
--> ----------------------------------------------------------------
-- defining module CHECKcnr
-- reading in file : rwl
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/rwl.cafe
-- defining module! RWL
-- done reading in file: rwl
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-tr-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 待ち行列の最後に入る状態遷移 (WT: want transition)
--> ----------------------------------------------------------------
-- defining module! WTtr
--> ----------------------------------------------------------------
--> 待ち行列の先頭にきたら共有資源を使う状態遷移 (TY: try transition)
--> ----------------------------------------------------------------
-- defining module! TYtr
--> ----------------------------------------------------------------
--> 共有資源を使い終わったら待ち行列を離れる状態遷移 (EX: exit transition)
--> ----------------------------------------------------------------
-- defining module! EXtr
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-mx-inv-prp.cafe
--> ****************************************************************
--> 5.3 検索述語によるシミュレーション
--> 5.5 遷移システムの不変特性と帰納不変特性
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 相互排除性述語(ゴール述語)mx_:共用資源を使用中の実行主体はたかだか一つ
--> ----------------------------------------------------------------
-- defining module! MXprp
--> ----------------------------------------------------------------
--> hq=c_:共用資源を使用中であるであればキューの先頭要素である
--> ----------------------------------------------------------------
-- defining module! HQ=Cprp
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 状態述語((mx S:State) and (hq=c S))が
--> 1段の遷移で不変であることを規定した現状態/次状態関係述語cnr-iinv
--> ----------------------------------------------------------------
-- defining module CNRiinv-mx
--> ----------------------------------------------------------------
--> 述語cnr-iinvが任意の遷移について成り立つかをチェックする述語check-iinv
--> ----------------------------------------------------------------
-- defining module IINVcheck-mx
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 練習問題5.1 [帰納不変条件wt] 解答例開始
--> ****************************************************************
--> ****************************************************************
--> wt: [Q:Aq r (Ar:Aid Sr:As) w Sw:As c Sc:As]
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-wt: module for checking on WT
--> ----------------------------------------------------------------
-- defining module IINVcheck-mx-wt
--> ================================================================
--> check (iinvCheck-wt = true) 1
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-mx-wt
-- reading in file : int
-- reading in file : nat
-- reading in file : nznat
-- done reading in file: nznat
-- done reading in file: nat
-- done reading in file: int
:goal { ** root -----------------------------------------
-- context module: IINVcheck-mx-wt
-- sentence to be proved
eq iinvCheck-wt = true .
}
** Initial goal (root) is generated. **
q=nil defined as :csp{eq q = nilQ . eq q = (a1 | q1) . }
[q=nil]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "1".
[RD-]=> :goal{2}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "2".
(consumed 0.0140 sec, including 119 rewrites + 1594 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-mx-wt * 1
--> ================================================================
--> check (iinvCheck-wt = true) 2
--> ----------------------------------------------------------------
--> 1
-- opening module IINVcheck-mx-wt(X.STATE)
-- reduce in %IINVcheck-mx-wt(X.STATE) : (iinvCheck-wt):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0006 sec for 60 rewrites + 778 matches)
--> 2
-- opening module IINVcheck-mx-wt(X.STATE)
-- reduce in %IINVcheck-mx-wt(X.STATE) : (iinvCheck-wt):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0007 sec for 57 rewrites + 812 matches)
**> QED *** IINVcheck-mx-wt * 2
--> ****************************************************************
--> 練習問題5.1 解答例終了
--> ****************************************************************
--> ****************************************************************
--> ty: [(A:Aid | Q:Aq) r Sr:As w (A:Aid Sw:As) c Sc:As]
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-ty -- module for checking on TY
--> ----------------------------------------------------------------
-- defining module IINVcheck-mx-ty
--> ================================================================
--> check (iinvCheck-ty = true) 1
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-mx-ty
:goal { ** root -----------------------------------------
-- context module: IINVcheck-mx-ty
-- sentence to be proved
eq iinvCheck-ty = true .
}
** Initial goal (root) is generated. **
sc=em defined as :csp{eq sc = empS . eq sc = (ac1 sc1) . }
a=ac1 defined as :csp{eq a = ac1 . eq (a =a ac1) = false . }
[sc=em]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "1".
[a=ac1]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (ac1 (a sc1)) ]),
Sw:As |-> sw, A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (ac1 sc1) }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c (ac1 sc1) ])
=> ([ (a | q) r sr w sw c (a (ac1 sc1)) ])) % true) % (true xor ((a =a ac1)
and ((sc1 =< empS) and (sc1 =< a))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (ac1 (a sc1)) ]),
Sw:As |-> sw, A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (ac1 sc1) }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c (ac1 sc1) ])
=> ([ (a | q) r sr w sw c (a (ac1 sc1)) ])) % true) % (true xor ((a =a ac1)
and ((sc1 =< empS) and (sc1 =< a))))):Info
[a=ac1]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "2-1".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "2-2".
(consumed 0.0311 sec, including 1005 rewrites + 8105 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-mx-ty * 1
--> ================================================================
--> check (iinvCheck-ty = true) 2
--> ----------------------------------------------------------------
--> 1
-- opening module IINVcheck-mx-ty(X.STATE)
-- reduce in %IINVcheck-mx-ty(X.STATE) : (iinvCheck-ty):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0003 sec for 60 rewrites + 164 matches)
--> 2-1
-- opening module IINVcheck-mx-ty(X.STATE)
-- reduce in %IINVcheck-mx-ty(X.STATE) : (iinvCheck-ty):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0004 sec for 95 rewrites + 467 matches)
--> 2-2
-- opening module IINVcheck-mx-ty(X.STATE)
-- reduce in %IINVcheck-mx-ty(X.STATE) : (iinvCheck-ty):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0005 sec for 104 rewrites + 508 matches)
**> QED *** IINVcheck-mx-ty * 2
--> ================================================================
--> ****************************************************************
--> 練習問題5.2 [帰納不変条件ex] 解答例開始
--> ****************************************************************
--> ****************************************************************
--> ex: [(A:Aid | Q:Aq) r Sr:As w Sw:As c Sc:As]
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-mx-ex: module for checking on EX
--> ----------------------------------------------------------------
-- defining module IINVcheck-mx-ex
--> ================================================================
--> check (iinvCheck-ex = true) 1
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-mx-ex
:goal { ** root -----------------------------------------
-- context module: IINVcheck-mx-ex
-- sentence to be proved
eq iinvCheck-ex = true .
}
** Initial goal (root) is generated. **
sc=em defined as :csp{eq sc = empS . eq sc = (ac1 sc1) . }
sc1=e defined as :csp{eq sc1 = empS . eq sc1 = (ac2 sc2) . }
a=ac1 defined as :csp{eq a = ac1 . eq (a =a ac1) = false . }
[sc=em]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "1".
[sc1=e]=> :goal{1}
[RD-]=> :goal{1}
[a=ac1]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> ((a in sc1) xor ((a =a ac1) xor ((a =a ac1) and (a in sc1)))),
SS:State |-> ([ q r (a sr) w sw c ((ac1 sc1) -as a) ]), A:Aid |-> a, Q:Aq |-> q,
Sr:As |-> sr, Sc:As |-> (ac1 sc1), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (ac1 sc1) ]) => (
[ q r (a sr) w sw c ((ac1 sc1) -as a) ])) % ((a in sc1) xor ((a =a ac1)
xor ((a =a ac1) and (a in sc1))))) % (((sc1 =< a) and ((a =a ac1) and (sc1
=< empS))) xor (true xor (((((ac1 sc1) -as a) =< (hd q)) and ((((ac1 sc1)
-as a) =< empS) and ((mx ((ac1 sc1) -as a)) and ((q =aq nilQ) and (((hd q)
in ((ac1 sc1) -as a)) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))))))
xor (((mx ((ac1 sc1) -as a)) and ((((ac1 sc1) -as a) =< (hd q)) and ((((ac1 sc1)
-as a) =< empS) and (((hd q) in ((ac1 sc1) -as a)) and ((sc1 =< empS) and ((a
=a ac1) and (sc1 =< a))))))) xor (((mx ((ac1 sc1) -as a)) and ((((ac1 sc1)
-as a) =< empS) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))) xor ((((
hd q) in ((ac1 sc1) -as a)) and ((mx ((ac1 sc1) -as a)) and ((((ac1 sc1)
-as a) =< (hd q)) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))))
xor ((((ac1 sc1) -as a) =< (hd q)) and ((q =aq nilQ) and (((hd q) in ((ac1 sc1)
-as a)) and ((mx ((ac1 sc1) -as a)) and ((a =a ac1) and ((sc1 =< a) and (sc1
=< empS)))))))))))))):Info
{ CC:Bool |-> ((a in sc1) xor ((a =a ac1) xor ((a =a ac1) and (a in sc1)))),
SS:State |-> ([ q r (a sr) w sw c ((ac1 sc1) -as a) ]), A:Aid |-> a, Q:Aq |-> q,
Sr:As |-> sr, Sc:As |-> (ac1 sc1), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (ac1 sc1) ]) => (
[ q r (a sr) w sw c ((ac1 sc1) -as a) ])) % ((a in sc1) xor ((a =a ac1)
xor ((a =a ac1) and (a in sc1))))) % (((sc1 =< a) and ((a =a ac1) and (sc1
=< empS))) xor (true xor (((((ac1 sc1) -as a) =< (hd q)) and ((((ac1 sc1)
-as a) =< empS) and ((mx ((ac1 sc1) -as a)) and ((q =aq nilQ) and (((hd q)
in ((ac1 sc1) -as a)) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))))))
xor (((mx ((ac1 sc1) -as a)) and ((((ac1 sc1) -as a) =< (hd q)) and ((((ac1 sc1)
-as a) =< empS) and (((hd q) in ((ac1 sc1) -as a)) and ((sc1 =< empS) and ((a
=a ac1) and (sc1 =< a))))))) xor (((mx ((ac1 sc1) -as a)) and ((((ac1 sc1)
-as a) =< empS) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))) xor ((((
hd q) in ((ac1 sc1) -as a)) and ((mx ((ac1 sc1) -as a)) and ((((ac1 sc1)
-as a) =< (hd q)) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))))
xor ((((ac1 sc1) -as a) =< (hd q)) and ((q =aq nilQ) and (((hd q) in ((ac1 sc1)
-as a)) and ((mx ((ac1 sc1) -as a)) and ((a =a ac1) and ((sc1 =< a) and (sc1
=< empS)))))))))))))):Info
[sc1=e]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
{ CC:Bool |-> (a =a ac1), SS:State |-> ([ q r (a sr) w sw c (ac1 -as a)
]), A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c ac1 ]) => ([ q r (a sr)
w sw c (ac1 -as a) ])) % (a =a ac1)) % ((ac1 =a a) xor (true xor ((((ac1
-as a) =< (hd q)) and (((ac1 -as a) =< empS) and ((mx (ac1 -as a)) and ((q
=aq nilQ) and (((hd q) in (ac1 -as a)) and (ac1 =a a)))))) xor (((mx (ac1
-as a)) and (((ac1 -as a) =< (hd q)) and (((ac1 -as a) =< empS) and (((hd q)
in (ac1 -as a)) and (ac1 =a a))))) xor (((mx (ac1 -as a)) and (((ac1 -as a)
=< empS) and (ac1 =a a))) xor ((((hd q) in (ac1 -as a)) and ((mx (ac1 -as a))
and (((ac1 -as a) =< (hd q)) and (ac1 =a a)))) xor (((ac1 -as a) =< (hd q))
and ((q =aq nilQ) and (((hd q) in (ac1 -as a)) and ((mx (ac1 -as a)) and (ac1
=a a)))))))))))):Info
{ CC:Bool |-> (a =a ac1), SS:State |-> ([ q r (a sr) w sw c (ac1 -as a)
]), A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c ac1 ]) => ([ q r (a sr)
w sw c (ac1 -as a) ])) % (a =a ac1)) % ((ac1 =a a) xor (true xor ((((ac1
-as a) =< (hd q)) and (((ac1 -as a) =< empS) and ((mx (ac1 -as a)) and ((q
=aq nilQ) and (((hd q) in (ac1 -as a)) and (ac1 =a a)))))) xor (((mx (ac1
-as a)) and (((ac1 -as a) =< (hd q)) and (((ac1 -as a) =< empS) and (((hd q)
in (ac1 -as a)) and (ac1 =a a))))) xor (((mx (ac1 -as a)) and (((ac1 -as a)
=< empS) and (ac1 =a a))) xor ((((hd q) in (ac1 -as a)) and ((mx (ac1 -as a))
and (((ac1 -as a) =< (hd q)) and (ac1 =a a)))) xor (((ac1 -as a) =< (hd q))
and ((q =aq nilQ) and (((hd q) in (ac1 -as a)) and ((mx (ac1 -as a)) and (ac1
=a a)))))))))))):Info
[a=ac1]=> :goal{2-1}
** Generated 2 goals
[RD-]=> :goal{2-1-1}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "2-1-1".
[RD-]=> :goal{2-1-2}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "2-1-2".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "2-2".
[a=ac1]=> :goal{2-2}
[RD-]=> :goal{2-2}
(consumed 0.1062 sec, including 1537 rewrites + 65303 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-mx-ex * 1
--> ================================================================
--> check (iinvCheck-ex = true) 2
--> ----------------------------------------------------------------
--> 1
-- opening module IINVcheck-mx-ex(X.STATE)
-- reduce in %IINVcheck-mx-ex(X.STATE) : (iinvCheck-ex):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0013 sec for 60 rewrites + 1709 matches)
--> 2-1-1
-- opening module IINVcheck-mx-ex(X.STATE)
-- reduce in %IINVcheck-mx-ex(X.STATE) : (iinvCheck-ex):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0003 sec for 68 rewrites + 157 matches)
--> 2-1-2
-- opening module IINVcheck-mx-ex(X.STATE)
-- reduce in %IINVcheck-mx-ex(X.STATE) : (iinvCheck-ex):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0009 sec for 83 rewrites + 1167 matches)
--> 2-2
-- opening module IINVcheck-mx-ex(X.STATE)
-- reduce in %IINVcheck-mx-ex(X.STATE) : (iinvCheck-ex):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0032 sec for 110 rewrites + 4176 matches)
**> QED *** IINVcheck-mx-ex * 2
--> ================================================================
--> ****************************************************************
--> 練習問題5.2 解答例終了
--> ****************************************************************
--> ****************************************************************
--> 5.8.1 未使用定数の宣言と証明規則の定義
--> ****************************************************************
--> ****************************************************************
--> 5.8.2 binspect と bshow
--> ****************************************************************
** Beginning a new proof in IINVcheck-mx-ty
:goal { ** root -----------------------------------------
-- context module: IINVcheck-mx-ty
-- sentence to be proved
eq iinvCheck-ty = true .
}
** Initial goal (root) is generated. **
[RD-]=> :goal{root}
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (a sc) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> sc }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c sc ]) => ([ (a
| q) r sr w sw c (a sc) ])) % true) % (((a in sc) and ((sc =< a) and (mx sc)))
xor (((sc =< empS) and (mx sc)) xor (((sc =< empS) and ((sc =< a) and ((a
in sc) and (mx sc)))) xor (true xor ((mx sc) and ((sc =< empS) and (sc =< a)))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (a sc) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> sc }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c sc ]) => ([ (a
| q) r sr w sw c (a sc) ])) % true) % (((a in sc) and ((sc =< a) and (mx sc)))
xor (((sc =< empS) and (mx sc)) xor (((sc =< empS) and ((sc =< a) and ((a
in sc) and (mx sc)))) xor (true xor ((mx sc) and ((sc =< empS) and (sc =< a)))))))):Info
(consumed 0.0077 sec, including 531 rewrites + 7984 matches)
>> Next target goal is "root".
>> Remaining 1 goal.
(((sc =< a) and ((a in sc) and (mx sc))) xor (((sc =< empS) and (mx sc)) xor (((sc =< empS) and ((sc =< a) and ((a in sc) and (mx sc)))) xor (true xor ((mx sc) and ((sc =< empS) and (sc =< a))))))):Bool
(consumed 0.0001 sec, including 0 rewrites + 85 matches, 10 memo hits)
--> (((mx sc) and (sc =< empS)) xor (true xor (((sc =< empS) and ((sc =< a) and (mx sc))) xor (((sc =< a) and ((mx sc) and ((a in sc) and (sc =< empS)))) xor ((a in sc) and ((mx sc) and (sc =< a)))))))
** Abstracted boolean term:
(consumed 0.000 sec. for abstraction)
((`P-3:Bool and (`P-1:Bool and `P-4:Bool)) xor ((`P-2:Bool and (`P-4 and (`P-1 and `P-3))) xor ((`P-1 and (`P-3 and `P-2)) xor (true xor (`P-2 and `P-1)))))
where
`P-1 = (mx sc)
`P-2 = (sc =< empS)
`P-3 = (sc =< a)
`P-4 = (a in sc)
>> xor ***>
>> and --->
`P-1 = (mx sc)
`P-2 = (sc =< empS)
<----------
>> and --->
`P-1 = (mx sc)
`P-2 = (sc =< empS)
`P-3 = (sc =< a)
<----------
>> and --->
`P-1 = (mx sc)
`P-2 = (sc =< empS)
`P-3 = (sc =< a)
`P-4 = (a in sc)
<----------
>> and --->
`P-1 = (mx sc)
`P-3 = (sc =< a)
`P-4 = (a in sc)
<----------
true
<**********
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
IINVcheck-mx-ty(X.STATE)> [Leaving CafeOBJ]
========================================
Running: qlock-mx-init-ps.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:19 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/qlock-mx-init-ps.cafe
--> ****************************************************************
--> 5.6 初期状態条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-init-prp.cafe
--> ****************************************************************
--> 5.5 遷移システムの不変特性と帰納不変特性
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 初期状態述語
--> ----------------------------------------------------------------
-- defining module! INITprp
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-mx-inv-prp.cafe
--> ****************************************************************
--> 5.3 検索述語によるシミュレーション
--> 5.5 遷移システムの不変特性と帰納不変特性
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 相互排除性述語(ゴール述語)mx_:共用資源を使用中の実行主体はたかだか一つ
--> ----------------------------------------------------------------
-- defining module! MXprp
--> ----------------------------------------------------------------
--> hq=c_:共用資源を使用中であるであればキューの先頭要素である
--> ----------------------------------------------------------------
-- defining module! HQ=Cprp
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 初期状態条件
--> ----------------------------------------------------------------
-- defining module INITcheck-mx
--> ================================================================
--> check (initCheck = true) 1
--> ----------------------------------------------------------------
** Beginning a new proof in INITcheck-mx
-- reading in file : int
-- reading in file : nat
-- reading in file : nznat
-- done reading in file: nznat
-- done reading in file: nat
-- done reading in file: int
:goal { ** root -----------------------------------------
-- context module: INITcheck-mx
-- sentence to be proved
eq initCheck = true .
}
** Initial goal (root) is generated. **
q=nil defined as :csp{eq q = nilQ . eq q = (a1 | q1) . }
sc=em defined as :csp{eq sc = empS . eq sc = (ac1 sc1) . }
[q=nil]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[sc=em]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-1".
[RD-]=> :goal{1-2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-2".
[RD-]=> :goal{2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "2".
[sc=em]=> :goal{2}
[RD-]=> :goal{2}
(consumed 0.0055 sec, including 197 rewrites + 1516 matches)
** All goals are successfully discharged.
**> QED *** INITcheck-mx * 1
--> ================================================================
--> ================================================================
--> check (initCheck = true) 2
--> ----------------------------------------------------------------
--> 1-1
-- opening module INITcheck-mx(X.STATE)
-- reduce in %INITcheck-mx(X.STATE) : (initCheck):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 37 rewrites + 126 matches)
--> 1-2
-- opening module INITcheck-mx(X.STATE)
-- reduce in %INITcheck-mx(X.STATE) : (initCheck):Bool
(true):Bool
(0.0000 sec for parse, 0.0003 sec for 60 rewrites + 502 matches)
--> 2
-- opening module INITcheck-mx(X.STATE)
-- reduce in %INITcheck-mx(X.STATE) : (initCheck):Bool
(true):Bool
(0.0000 sec for parse, 0.0002 sec for 35 rewrites + 398 matches)
**> QED *** INITcheck-mx * 2
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
INITcheck-mx(X.STATE)> [Leaving CafeOBJ]
========================================
Running: qlock-mx-inv-prp.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:19 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/qlock-mx-inv-prp.cafe
--> ****************************************************************
--> 5.3 検索述語によるシミュレーション
--> 5.5 遷移システムの不変特性と帰納不変特性
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 相互排除性述語(ゴール述語)mx_:共用資源を使用中の実行主体はたかだか一つ
--> ----------------------------------------------------------------
-- defining module! MXprp
--> ----------------------------------------------------------------
--> hq=c_:共用資源を使用中であるであればキューの先頭要素である
--> ----------------------------------------------------------------
-- defining module! HQ=Cprp
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
CafeOBJ> [Leaving CafeOBJ]
========================================
Running: qlock-state-sys.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:19 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
CafeOBJ> [Leaving CafeOBJ]
========================================
Running: qlock-tr-sys.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:19 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/qlock-tr-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 待ち行列の最後に入る状態遷移 (WT: want transition)
--> ----------------------------------------------------------------
-- defining module! WTtr
-- reading in file : rwl
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/rwl.cafe
-- defining module! RWL
-- done reading in file: rwl
--> ----------------------------------------------------------------
--> 待ち行列の先頭にきたら共有資源を使う状態遷移 (TY: try transition)
--> ----------------------------------------------------------------
-- defining module! TYtr
--> ----------------------------------------------------------------
--> 共有資源を使い終わったら待ち行列を離れる状態遷移 (EX: exit transition)
--> ----------------------------------------------------------------
-- defining module! EXtr
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
CafeOBJ> [Leaving CafeOBJ]
========================================
Running: qlock-wc-daq-lm.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:19 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/qlock-wc-daq-lm.cafe
--> ****************************************************************
--> 5.10.1 補題モジュール DAQ-lm
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-dms-prp.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-qtos.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> モジュール'Q->S'
--> ----------------------------------------------------------------
-- defining module! Q->S
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./pnat.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
--> PNAT with _+_ and _*_
--> ----------------------------------------------------------------
-- defining module! PNAT
-- defining module! PNAT=
-- defining module! PNAT+ac
-- defining module! PNAT*ac
--> ----------------------------------------------------------------
--> 大小述語_>_が定義されたPNAT
--> ----------------------------------------------------------------
-- defining module! PNAT*ac>
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 基本到達特性wcの証明のための自然数値の減少関数#dms
--> ----------------------------------------------------------------
-- defining module* DMS
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ================================================================
--> モジュールDMSで,等式
--> cq #daq((Q:Aq | A1:Aid),A2:Aid) = #daq(Q,A2)
--> if not(A1 =a A2) and (A2 in (q->s Q)) .
--> が成り立つことを,
--> Q:Aqに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> proof module (module for the proof)
--> ----------------------------------------------------------------
-- defining module DAQqa1a2
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- opening module DAQqa1a2(X.STATE)
-- reduce in %DAQqa1a2(X.STATE) : (#daq-qa1a2(nilQ,a1,a2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 35 rewrites + 104 matches)
**> QED *** DAQqa1a2 * base
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- opening module DAQqa1a2(X.STATE)
** Beginning a new proof in %
-- reading in file : int
-- reading in file : nat
-- reading in file : nznat
-- done reading in file: nznat
-- done reading in file: nat
-- done reading in file: int
:goal { ** root -----------------------------------------
-- context module: %
-- sentence to be proved
eq #daq-qa1a2((a | q),a1,a2) = true .
}
** Initial goal (root) is generated. **
a1=a2 defined as :csp{eq a1 = a2 . eq (a1 =a a2) = false . }
a=a2 defined as :csp{eq a = a2 . eq (a =a a2) = false . }
a2!q defined as :csp{eq (a2 in (q->s q)) = true . eq (a2 in (q->s q)) = false . }
[a1=a2]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq #daq-qa1a2((a | q),a1,a2) = true
[RD-] discharged goal "1".
[a=a2]=> :goal{1}
[RD-]=> :goal{1}
[a2!q]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
[a=a2]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq #daq-qa1a2((a | q),a1,a2) = true
[RD-] discharged goal "2-1".
[a2!q]=> :goal{2-1}
[RD-]=> :goal{2-1}
[RD-]=> :goal{2-2}
[a2!q]=> :goal{2-2}
** Generated 2 goals
[RD-]=> :goal{2-2-1}
[RD-] discharged:
eq #daq-qa1a2((a | q),a1,a2) = true
[RD-] discharged goal "2-2-1".
[RD-]=> :goal{2-2-2}
[RD-] discharged:
eq #daq-qa1a2((a | q),a1,a2) = true
[RD-] discharged goal "2-2-2".
(consumed 0.0095 sec, including 264 rewrites + 3445 matches)
** All goals are successfully discharged.
**> QED *** DAQqa1a2 * step
--> ================================================================
--> ----------------------------------------------------------------
--> module of lemma about #daq
--> ----------------------------------------------------------------
-- defining module! DAQ-lm
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
CafeOBJ> [Leaving CafeOBJ]
========================================
Running: qlock-wc-dms-prp.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:19 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/qlock-wc-dms-prp.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-qtos.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> モジュール'Q->S'
--> ----------------------------------------------------------------
-- defining module! Q->S
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./pnat.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
--> PNAT with _+_ and _*_
--> ----------------------------------------------------------------
-- defining module! PNAT
-- defining module! PNAT=
-- defining module! PNAT+ac
-- defining module! PNAT*ac
--> ----------------------------------------------------------------
--> 大小述語_>_が定義されたPNAT
--> ----------------------------------------------------------------
-- defining module! PNAT*ac>
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 基本到達特性wcの証明のための自然数値の減少関数#dms
--> ----------------------------------------------------------------
-- defining module* DMS
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
CafeOBJ> [Leaving CafeOBJ]
========================================
Running: qlock-wc-iinv-ps.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:19 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/qlock-wc-iinv-ps.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./check-cnr.cafe
--> ****************************************************************
--> 5.7 検索述語による遷移の検索
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
-- defining module CNR
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> module for defining check-cnr
--> ----------------------------------------------------------------
-- defining module CHECKcnr
-- reading in file : rwl
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/rwl.cafe
-- defining module! RWL
-- done reading in file: rwl
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-tr-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 待ち行列の最後に入る状態遷移 (WT: want transition)
--> ----------------------------------------------------------------
-- defining module! WTtr
--> ----------------------------------------------------------------
--> 待ち行列の先頭にきたら共有資源を使う状態遷移 (TY: try transition)
--> ----------------------------------------------------------------
-- defining module! TYtr
--> ----------------------------------------------------------------
--> 共有資源を使い終わったら待ち行列を離れる状態遷移 (EX: exit transition)
--> ----------------------------------------------------------------
-- defining module! EXtr
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-wc-inv-prp.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-qtos.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> モジュール'Q->S'
--> ----------------------------------------------------------------
-- defining module! Q->S
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 基本到達特性wcの証明のための5つの不変特性:
--> (r^w S),(w^c S),(r^c S),(q=wc S),(qvr S)
--> を定義するモジュール
--> ----------------------------------------------------------------
-- defining module! WCinvs
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-wc-state-lm.cafe
--> ****************************************************************
--> 5.11.1 補題モジュール STATE-lm
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ================================================================
--> モジュールSTATEで,等式
--> cq (A:Aid in (S1:As S2:As)) = (A in S1) or (A in S2)
--> if (not(S1 == empS) and not(S2 == empS)) .
--> が成り立つことを,
--> S:Asに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> module for the proof (proof module)
--> ----------------------------------------------------------------
-- defining module STains1s2
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- defining module STains1s2-base
-- opening module STains1s2-base(X.STATE)
-- reduce in %STains1s2-base(X.STATE) : (ains1s2(a,empS,s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 15 rewrites + 40 matches)
**> QED *** STains1s2 * base * t
-- opening module STains1s2-base(X.STATE)
-- reduce in %STains1s2-base(X.STATE) : (ains1s2(a,empS,s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 15 rewrites + 42 matches)
**> QED *** STains1s2 * base * f
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- defining module STains1s2-step
-- opening module STains1s2-step(X.STATE)
-- reduce in %STains1s2-step(X.STATE) : (ains1s2(a,(a1 s1),s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0004 sec for 41 rewrites + 557 matches)
**> QED *** STains1s2 * step * t
-- opening module STains1s2-step(X.STATE)
-- reduce in %STains1s2-step(X.STATE) : (ains1s2(a,(a1 s1),s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0004 sec for 41 rewrites + 561 matches)
**> QED *** STains1s2 * step * f
--> ================================================================
--> ================================================================
--> モジュールSTATEで,等式
--> eq[s1=<s2]:
--> ((S1:As =< S2:As) and (S1 =< (A:Aid S2))) = (S1 =< S2) .
--> が成り立つことを,
--> S1:Asに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- opening module STATE(X)
-- reduce in %STATE(X) : (((empS =< s2) and (empS =< (a s2))) = (empS =< s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 7 matches)
**> QED *** ST * s1=<s2 * base
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- opening module STATE(X)
-- reduce in %STATE(X) : ((((a1 s1) =< s2) and ((a1 s1) =< (a s2))) = ((a1 s1) =< s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0005 sec for 17 rewrites + 647 matches)
**> QED *** ST * s1=<s2 * step
--> ================================================================
--> ================================================================
--> モジュールSTATEで,等式
--> cq (S1:As =< (A:Aid S2:As)) = S1 =< S2 if (not(A in S1)) .
--> が成り立つことを,
--> S1:Asに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> proof module
--> ----------------------------------------------------------------
-- defining module STs1=<as2
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- opening module STs1=<as2(X.STATE)
-- reduce in %STs1=<as2(X.STATE) : (s1=<as2(empS,a,s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 11 rewrites + 17 matches)
**> QED *** STs1=<as2 * base
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- opening module STs1=<as2(X.STATE)
** Beginning a new proof in %
-- reading in file : int
-- reading in file : nat
-- reading in file : nznat
-- done reading in file: nznat
-- done reading in file: nat
-- done reading in file: int
:goal { ** root -----------------------------------------
-- context module: %
-- sentence to be proved
eq s1=<as2((a1 s1),a,s2) = true .
}
** Initial goal (root) is generated. **
a=a1 defined as :csp{eq a = a1 . eq (a =a a1) = false . }
a1@s2 defined as :csp{eq s2 = (a1 s21) . eq (a1 in s2) = false . }
a@s1 defined as :csp{eq s1 = (a s11) . eq (a in s1) = false . }
[a=a1]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "1".
[a1@s2]=> :goal{1}
[RD-]=> :goal{1}
[a@s1]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
[a1@s2]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[a@s1]=> :goal{2-1}
** Generated 2 goals
[RD-]=> :goal{2-1-1}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "2-1-1".
[RD-]=> :goal{2-1-2}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "2-1-2".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "2-2".
[a@s1]=> :goal{2-2}
[RD-]=> :goal{2-2}
(consumed 0.0075 sec, including 239 rewrites + 2414 matches)
** All goals are successfully discharged.
**> QED *** STs1=<as2 * step
--> ================================================================
--> ----------------------------------------------------------------
--> lemmas on STATE
--> ----------------------------------------------------------------
-- defining module! STATE-lm
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> CNRiinv-wc -- module for defining cnr for inductive invariant
--> ----------------------------------------------------------------
-- defining module CNRiinv-wc
--> ----------------------------------------------------------------
--> IINVcheck-wc -- module for checking invariant/stability
--> ----------------------------------------------------------------
-- defining module IINVcheck-wc
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> wt: [Q r Ar Sr w Sw c Sc]
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-wc-wt: module for checking on WT
--> ----------------------------------------------------------------
-- defining module IINVcheck-wc-wt
--> ================================================================
--> check (iinvCheck-wt = true)
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-wc-wt
:goal { ** root -----------------------------------------
-- context module: IINVcheck-wc-wt
-- sentence to be proved
eq iinvCheck-wt = true .
}
** Initial goal (root) is generated. **
ar!sw defined as :csp{eq (ar in sw) = true . eq (ar in sw) = false . }
ar!sc defined as :csp{eq (ar in sc) = true . eq (ar in sc) = false . }
[ar!sw]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "1".
[ar!sc]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (ar sw) c sc ]), Sr:As
|-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> sc, Sw:As |-> sw }
--> (((### not determined ### ; ([ q r (ar sr) w sw c sc ]) => ([ (q | ar)
r sr w (ar sw) c sc ])) % true) % ((((sc ^ sw) =< empS) and (((sc sw) =< (
q->s q)) and (((q->s q) =< (sc sw)) and (((if (ar in sc) then (ar (sr ^ sc))
else (sr ^ sc) fi) =< empS) and ((sr ^ sw) =< empS))))) xor (true xor (((
q->s q) =< (sw sc)) and (((sw ^ sc) =< empS) and (((sw sc) =< (q->s q))
and (((if (ar in sc) then (ar (sw ^ sc)) else (sw ^ sc) fi) =< empS) and (((sr
^ sw) =< empS) and (((if (ar in sc) then (ar (sr ^ sc)) else (sr ^ sc) fi)
=< empS) and ((sc ^ sr) =< empS)))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (ar sw) c sc ]), Sr:As
|-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> sc, Sw:As |-> sw }
--> (((### not determined ### ; ([ q r (ar sr) w sw c sc ]) => ([ (q | ar)
r sr w (ar sw) c sc ])) % true) % ((((sc ^ sw) =< empS) and (((sc sw) =< (
q->s q)) and (((q->s q) =< (sc sw)) and (((if (ar in sc) then (ar (sr ^ sc))
else (sr ^ sc) fi) =< empS) and ((sr ^ sw) =< empS))))) xor (true xor (((
q->s q) =< (sw sc)) and (((sw ^ sc) =< empS) and (((sw sc) =< (q->s q))
and (((if (ar in sc) then (ar (sw ^ sc)) else (sw ^ sc) fi) =< empS) and (((sr
^ sw) =< empS) and (((if (ar in sc) then (ar (sr ^ sc)) else (sr ^ sc) fi)
=< empS) and ((sc ^ sr) =< empS)))))))))):Info
[ar!sc]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "2-1".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "2-2".
(consumed 0.0683 sec, including 2296 rewrites + 20391 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-wc-wt
--> ****************************************************************
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-wc-ty -- module for checking on TY
--> ----------------------------------------------------------------
-- defining module IINVcheck-wc-ty
--> ================================================================
--> check (iinvCheck-ty = true) (1)
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-wc-ty
:goal { ** root -----------------------------------------
-- context module: IINVcheck-wc-ty
-- sentence to be proved
eq iinvCheck-ty = true .
}
** Initial goal (root) is generated. **
a!sr defined as :csp{eq (a in sr) = true . eq (a in sr) = false . }
a!sc defined as :csp{eq (a in sc) = true . eq (a in sc) = false . }
[a!sr]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "1".
[a!sc]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (a sc) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> sc }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c sc ]) => ([ (a
| q) r sr w sw c (a sc) ])) % true) % ((((if (a in sc) then (a (sw ^ sc))
else (sw ^ sc) fi) =< empS) and (((sw sc) =< (a (q->s q))) and (((q->s q)
=< (a (sc sw))) and (((sc ^ sr) =< empS) and ((sw ^ sr) =< empS))))) xor (true
xor (((sc sw) =< (a (q->s q))) and (((sr ^ sc) =< empS) and (((sr ^ sw)
=< empS) and (((q->s q) =< (a (sc sw))) and (((if (a in sc) then (a (sw ^ sc))
else (sc ^ sw) fi) =< empS) and ((sw ^ sc) =< empS))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (a sc) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> sc }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c sc ]) => ([ (a
| q) r sr w sw c (a sc) ])) % true) % ((((if (a in sc) then (a (sw ^ sc))
else (sw ^ sc) fi) =< empS) and (((sw sc) =< (a (q->s q))) and (((q->s q)
=< (a (sc sw))) and (((sc ^ sr) =< empS) and ((sw ^ sr) =< empS))))) xor (true
xor (((sc sw) =< (a (q->s q))) and (((sr ^ sc) =< empS) and (((sr ^ sw)
=< empS) and (((q->s q) =< (a (sc sw))) and (((if (a in sc) then (a (sw ^ sc))
else (sc ^ sw) fi) =< empS) and ((sw ^ sc) =< empS))))))))):Info
[a!sc]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "2-1".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "2-2".
(consumed 0.0400 sec, including 1078 rewrites + 14392 matches)
** All goals are successfully discharged.
**> QED ** IINVcheck-wc-ty
--> ****************************************************************
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-wc-ex: proof module for checking on EX
--> ----------------------------------------------------------------
-- defining module IINVcheck-wc-ex
--> ================================================================
--> check (iinvCheck-ex = true)
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-wc-ex
:goal { ** root -----------------------------------------
-- context module: IINVcheck-wc-ex
-- sentence to be proved
eq iinvCheck-ex = true .
}
** Initial goal (root) is generated. **
a$sr defined as :csp{eq sr = (a sr-a) . eq (a in sr) = false . }
a$sw defined as :csp{eq sw = (a sw-a) . eq (a in sw) = false . }
a$sc defined as :csp{eq sc = (a sc-a) . eq (a in sc) = false . }
[a$sc]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
{ CC:Bool |-> true, SS:State |-> ([ q r (a sr) w sw c sc-a ]), A:Aid |-> a,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (a sc-a), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (a sc-a) ]) => (
[ q r (a sr) w sw c sc-a ])) % true) % ((((if (a in sw) then (a (sc-a ^ sw))
else (sc-a ^ sw) fi) =< empS) and (((sw sc-a) =< (a (q->s q))) and (((
q->s q) =< (sw sc-a)) and (((if (a in sr) then (a (sc-a ^ sr)) else (sc-a
^ sr) fi) =< empS) and ((sw ^ sr) =< empS))))) xor (true xor (((sc-a sw)
=< (q->s q)) and (((if (a in sw) then (a (sc-a ^ sw)) else (sw ^ sc-a) fi)
=< empS) and (((sr ^ sw) =< empS) and (((if (a in sw) then (a (sr ^ sw))
else (sr ^ sw) fi) =< empS) and (((sr ^ sc-a) =< empS) and (((q->s q) =< (sc-a sw))
and (((sw ^ sc-a) =< empS) and ((if (a in sr) then (a (sc-a ^ sr)) else (sr
^ sc-a) fi) =< empS))))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ q r (a sr) w sw c sc-a ]), A:Aid |-> a,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (a sc-a), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (a sc-a) ]) => (
[ q r (a sr) w sw c sc-a ])) % true) % ((((if (a in sw) then (a (sc-a ^ sw))
else (sc-a ^ sw) fi) =< empS) and (((sw sc-a) =< (a (q->s q))) and (((
q->s q) =< (sw sc-a)) and (((if (a in sr) then (a (sc-a ^ sr)) else (sc-a
^ sr) fi) =< empS) and ((sw ^ sr) =< empS))))) xor (true xor (((sc-a sw)
=< (q->s q)) and (((if (a in sw) then (a (sc-a ^ sw)) else (sw ^ sc-a) fi)
=< empS) and (((sr ^ sw) =< empS) and (((if (a in sw) then (a (sr ^ sw))
else (sr ^ sw) fi) =< empS) and (((sr ^ sc-a) =< empS) and (((q->s q) =< (sc-a sw))
and (((sw ^ sc-a) =< empS) and ((if (a in sr) then (a (sc-a ^ sr)) else (sr
^ sc-a) fi) =< empS))))))))))):Info
[a$sw]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "1-1".
[a$sr]=> :goal{1-1}
[RD-]=> :goal{1-1}
[RD-]=> :goal{1-2}
{ CC:Bool |-> true, SS:State |-> ([ q r (a sr) w sw c sc-a ]), A:Aid |-> a,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (a sc-a), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (a sc-a) ]) => (
[ q r (a sr) w sw c sc-a ])) % true) % ((((sc-a ^ sw) =< empS) and (((sc-a sw)
=< (q->s q)) and (((q->s q) =< (sw sc-a)) and (((if (a in sr) then (a (sc-a
^ sr)) else (sc-a ^ sr) fi) =< empS) and ((sw ^ sr) =< empS))))) xor (true
xor (((sw ^ sc-a) =< empS) and (((q->s q) =< (sw sc-a)) and (((sw ^ sr)
=< empS) and (((sw sc-a) =< (q->s q)) and (((if (a in sr) then (a (sc-a ^ sr))
else (sr ^ sc-a) fi) =< empS) and ((sc-a ^ sr) =< empS))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ q r (a sr) w sw c sc-a ]), A:Aid |-> a,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (a sc-a), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (a sc-a) ]) => (
[ q r (a sr) w sw c sc-a ])) % true) % ((((sc-a ^ sw) =< empS) and (((sc-a sw)
=< (q->s q)) and (((q->s q) =< (sw sc-a)) and (((if (a in sr) then (a (sc-a
^ sr)) else (sc-a ^ sr) fi) =< empS) and ((sw ^ sr) =< empS))))) xor (true
xor (((sw ^ sc-a) =< empS) and (((q->s q) =< (sw sc-a)) and (((sw ^ sr)
=< empS) and (((sw sc-a) =< (q->s q)) and (((if (a in sr) then (a (sc-a ^ sr))
else (sr ^ sc-a) fi) =< empS) and ((sc-a ^ sr) =< empS))))))))):Info
[a$sr]=> :goal{1-2}
** Generated 2 goals
[RD-]=> :goal{1-2-1}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "1-2-1".
[RD-]=> :goal{1-2-2}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "1-2-2".
[RD-]=> :goal{2}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "2".
[a$sw]=> :goal{2}
[RD-]=> :goal{2}
[a$sr]=> :goal{2}
[RD-]=> :goal{2}
(consumed 0.2162 sec, including 4006 rewrites + 33065 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-wc-ex
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
IINVcheck-wc-ex(X.STATE)> [Leaving CafeOBJ]
========================================
Running: qlock-wc-init-ps.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:20 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/qlock-wc-init-ps.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-init-prp.cafe
--> ****************************************************************
--> 5.5 遷移システムの不変特性と帰納不変特性
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 初期状態述語
--> ----------------------------------------------------------------
-- defining module! INITprp
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-wc-inv-prp.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-qtos.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> モジュール'Q->S'
--> ----------------------------------------------------------------
-- defining module! Q->S
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 基本到達特性wcの証明のための5つの不変特性:
--> (r^w S),(w^c S),(r^c S),(q=wc S),(qvr S)
--> を定義するモジュール
--> ----------------------------------------------------------------
-- defining module! WCinvs
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 初期状態条件のチェックのためのモジュール
--> ----------------------------------------------------------------
-- defining module INITcheck-wc
--> ================================================================
--> check (initCheck = true)
--> ----------------------------------------------------------------
** Beginning a new proof in INITcheck-wc
-- reading in file : int
-- reading in file : nat
-- reading in file : nznat
-- done reading in file: nznat
-- done reading in file: nat
-- done reading in file: int
:goal { ** root -----------------------------------------
-- context module: INITcheck-wc
-- sentence to be proved
eq initCheck = true .
}
** Initial goal (root) is generated. **
q=nil defined as :csp{eq q = nilQ . eq (q =aq nilQ) = false . }
sr=em defined as :csp{eq sr = empS . eq (sr =as empS) = false . }
sw=em defined as :csp{eq sw = empS . eq (sw =as empS) = false . }
sc=em defined as :csp{eq sc = empS . eq (sc =as empS) = false . }
[q=nil]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[sr=em]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-1".
[sw=em]=> :goal{1-1}
[RD-]=> :goal{1-1}
[sc=em]=> :goal{1-1}
[RD-]=> :goal{1-1}
[RD-]=> :goal{1-2}
[sw=em]=> :goal{1-2}
** Generated 2 goals
[RD-]=> :goal{1-2-1}
[sc=em]=> :goal{1-2-1}
** Generated 2 goals
[RD-]=> :goal{1-2-1-1}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-2-1-1".
[RD-]=> :goal{1-2-1-2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-2-1-2".
[RD-]=> :goal{1-2-2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-2-2".
[sc=em]=> :goal{1-2-2}
[RD-]=> :goal{1-2-2}
[RD-]=> :goal{2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "2".
[sr=em]=> :goal{2}
[RD-]=> :goal{2}
[sw=em]=> :goal{2}
[RD-]=> :goal{2}
[sc=em]=> :goal{2}
[RD-]=> :goal{2}
(consumed 0.0130 sec, including 525 rewrites + 4622 matches)
** All goals are successfully discharged.
**> QED *** INITcheck-wc
--> ================================================================
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
INITcheck-wc(X.STATE)> [Leaving CafeOBJ]
========================================
Running: qlock-wc-inv-lm.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:20 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/qlock-wc-inv-lm.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-mx-init-ps.cafe
--> ****************************************************************
--> 5.6 初期状態条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-init-prp.cafe
--> ****************************************************************
--> 5.5 遷移システムの不変特性と帰納不変特性
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 初期状態述語
--> ----------------------------------------------------------------
-- defining module! INITprp
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-mx-inv-prp.cafe
--> ****************************************************************
--> 5.3 検索述語によるシミュレーション
--> 5.5 遷移システムの不変特性と帰納不変特性
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 相互排除性述語(ゴール述語)mx_:共用資源を使用中の実行主体はたかだか一つ
--> ----------------------------------------------------------------
-- defining module! MXprp
--> ----------------------------------------------------------------
--> hq=c_:共用資源を使用中であるであればキューの先頭要素である
--> ----------------------------------------------------------------
-- defining module! HQ=Cprp
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 初期状態条件
--> ----------------------------------------------------------------
-- defining module INITcheck-mx
--> ================================================================
--> check (initCheck = true) 1
--> ----------------------------------------------------------------
** Beginning a new proof in INITcheck-mx
-- reading in file : int
-- reading in file : nat
-- reading in file : nznat
-- done reading in file: nznat
-- done reading in file: nat
-- done reading in file: int
:goal { ** root -----------------------------------------
-- context module: INITcheck-mx
-- sentence to be proved
eq initCheck = true .
}
** Initial goal (root) is generated. **
q=nil defined as :csp{eq q = nilQ . eq q = (a1 | q1) . }
sc=em defined as :csp{eq sc = empS . eq sc = (ac1 sc1) . }
[q=nil]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[sc=em]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-1".
[RD-]=> :goal{1-2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-2".
[RD-]=> :goal{2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "2".
[sc=em]=> :goal{2}
[RD-]=> :goal{2}
(consumed 0.0055 sec, including 197 rewrites + 1516 matches)
** All goals are successfully discharged.
**> QED *** INITcheck-mx * 1
--> ================================================================
--> ================================================================
--> check (initCheck = true) 2
--> ----------------------------------------------------------------
--> 1-1
-- opening module INITcheck-mx(X.STATE)
-- reduce in %INITcheck-mx(X.STATE) : (initCheck):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 37 rewrites + 126 matches)
--> 1-2
-- opening module INITcheck-mx(X.STATE)
-- reduce in %INITcheck-mx(X.STATE) : (initCheck):Bool
(true):Bool
(0.0000 sec for parse, 0.0003 sec for 60 rewrites + 502 matches)
--> 2
-- opening module INITcheck-mx(X.STATE)
-- reduce in %INITcheck-mx(X.STATE) : (initCheck):Bool
(true):Bool
(0.0000 sec for parse, 0.0002 sec for 35 rewrites + 398 matches)
**> QED *** INITcheck-mx * 2
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-wc-init-ps.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-inv-prp.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-qtos.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> モジュール'Q->S'
--> ----------------------------------------------------------------
-- defining module! Q->S
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 基本到達特性wcの証明のための5つの不変特性:
--> (r^w S),(w^c S),(r^c S),(q=wc S),(qvr S)
--> を定義するモジュール
--> ----------------------------------------------------------------
-- defining module! WCinvs
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 初期状態条件のチェックのためのモジュール
--> ----------------------------------------------------------------
-- defining module INITcheck-wc
--> ================================================================
--> check (initCheck = true)
--> ----------------------------------------------------------------
** Beginning a new proof in INITcheck-wc
:goal { ** root -----------------------------------------
-- context module: INITcheck-wc
-- sentence to be proved
eq initCheck = true .
}
** Initial goal (root) is generated. **
q=nil defined as :csp{eq q = nilQ . eq (q =aq nilQ) = false . }
sr=em defined as :csp{eq sr = empS . eq (sr =as empS) = false . }
sw=em defined as :csp{eq sw = empS . eq (sw =as empS) = false . }
sc=em defined as :csp{eq sc = empS . eq (sc =as empS) = false . }
[q=nil]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[sr=em]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-1".
[sw=em]=> :goal{1-1}
[RD-]=> :goal{1-1}
[sc=em]=> :goal{1-1}
[RD-]=> :goal{1-1}
[RD-]=> :goal{1-2}
[sw=em]=> :goal{1-2}
** Generated 2 goals
[RD-]=> :goal{1-2-1}
[sc=em]=> :goal{1-2-1}
** Generated 2 goals
[RD-]=> :goal{1-2-1-1}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-2-1-1".
[RD-]=> :goal{1-2-1-2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-2-1-2".
[RD-]=> :goal{1-2-2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-2-2".
[sc=em]=> :goal{1-2-2}
[RD-]=> :goal{1-2-2}
[RD-]=> :goal{2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "2".
[sr=em]=> :goal{2}
[RD-]=> :goal{2}
[sw=em]=> :goal{2}
[RD-]=> :goal{2}
[sc=em]=> :goal{2}
[RD-]=> :goal{2}
(consumed 0.0131 sec, including 525 rewrites + 4622 matches)
** All goals are successfully discharged.
**> QED *** INITcheck-wc
--> ================================================================
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-mx-iinv-ps.cafe
--> ****************************************************************
--> 5.8 帰納不変条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./check-cnr.cafe
--> ****************************************************************
--> 5.7 検索述語による遷移の検索
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
-- defining module CNR
--> ----------------------------------------------------------------
--> module for defining check-cnr
--> ----------------------------------------------------------------
-- defining module CHECKcnr
-- reading in file : rwl
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/rwl.cafe
-- defining module! RWL
-- done reading in file: rwl
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-tr-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 待ち行列の最後に入る状態遷移 (WT: want transition)
--> ----------------------------------------------------------------
-- defining module! WTtr
--> ----------------------------------------------------------------
--> 待ち行列の先頭にきたら共有資源を使う状態遷移 (TY: try transition)
--> ----------------------------------------------------------------
-- defining module! TYtr
--> ----------------------------------------------------------------
--> 共有資源を使い終わったら待ち行列を離れる状態遷移 (EX: exit transition)
--> ----------------------------------------------------------------
-- defining module! EXtr
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 状態述語((mx S:State) and (hq=c S))が
--> 1段の遷移で不変であることを規定した現状態/次状態関係述語cnr-iinv
--> ----------------------------------------------------------------
-- defining module CNRiinv-mx
--> ----------------------------------------------------------------
--> 述語cnr-iinvが任意の遷移について成り立つかをチェックする述語check-iinv
--> ----------------------------------------------------------------
-- defining module IINVcheck-mx
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 練習問題5.1 [帰納不変条件wt] 解答例開始
--> ****************************************************************
--> ****************************************************************
--> wt: [Q:Aq r (Ar:Aid Sr:As) w Sw:As c Sc:As]
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-wt: module for checking on WT
--> ----------------------------------------------------------------
-- defining module IINVcheck-mx-wt
--> ================================================================
--> check (iinvCheck-wt = true) 1
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-mx-wt
:goal { ** root -----------------------------------------
-- context module: IINVcheck-mx-wt
-- sentence to be proved
eq iinvCheck-wt = true .
}
** Initial goal (root) is generated. **
q=nil defined as :csp{eq q = nilQ . eq q = (a1 | q1) . }
[q=nil]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "1".
[RD-]=> :goal{2}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "2".
(consumed 0.0135 sec, including 119 rewrites + 1594 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-mx-wt * 1
--> ================================================================
--> check (iinvCheck-wt = true) 2
--> ----------------------------------------------------------------
--> 1
-- opening module IINVcheck-mx-wt(X.STATE)
-- reduce in %IINVcheck-mx-wt(X.STATE) : (iinvCheck-wt):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0006 sec for 60 rewrites + 778 matches)
--> 2
-- opening module IINVcheck-mx-wt(X.STATE)
-- reduce in %IINVcheck-mx-wt(X.STATE) : (iinvCheck-wt):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0007 sec for 57 rewrites + 812 matches)
**> QED *** IINVcheck-mx-wt * 2
--> ****************************************************************
--> 練習問題5.1 解答例終了
--> ****************************************************************
--> ****************************************************************
--> ty: [(A:Aid | Q:Aq) r Sr:As w (A:Aid Sw:As) c Sc:As]
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-ty -- module for checking on TY
--> ----------------------------------------------------------------
-- defining module IINVcheck-mx-ty
--> ================================================================
--> check (iinvCheck-ty = true) 1
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-mx-ty
:goal { ** root -----------------------------------------
-- context module: IINVcheck-mx-ty
-- sentence to be proved
eq iinvCheck-ty = true .
}
** Initial goal (root) is generated. **
sc=em defined as :csp{eq sc = empS . eq sc = (ac1 sc1) . }
a=ac1 defined as :csp{eq a = ac1 . eq (a =a ac1) = false . }
[sc=em]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "1".
[a=ac1]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (ac1 (a sc1)) ]),
Sw:As |-> sw, A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (ac1 sc1) }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c (ac1 sc1) ])
=> ([ (a | q) r sr w sw c (a (ac1 sc1)) ])) % true) % (true xor ((a =a ac1)
and ((sc1 =< empS) and (sc1 =< a))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (ac1 (a sc1)) ]),
Sw:As |-> sw, A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (ac1 sc1) }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c (ac1 sc1) ])
=> ([ (a | q) r sr w sw c (a (ac1 sc1)) ])) % true) % (true xor ((a =a ac1)
and ((sc1 =< empS) and (sc1 =< a))))):Info
[a=ac1]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "2-1".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "2-2".
(consumed 0.0314 sec, including 1005 rewrites + 8105 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-mx-ty * 1
--> ================================================================
--> check (iinvCheck-ty = true) 2
--> ----------------------------------------------------------------
--> 1
-- opening module IINVcheck-mx-ty(X.STATE)
-- reduce in %IINVcheck-mx-ty(X.STATE) : (iinvCheck-ty):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0002 sec for 60 rewrites + 164 matches)
--> 2-1
-- opening module IINVcheck-mx-ty(X.STATE)
-- reduce in %IINVcheck-mx-ty(X.STATE) : (iinvCheck-ty):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0004 sec for 95 rewrites + 467 matches)
--> 2-2
-- opening module IINVcheck-mx-ty(X.STATE)
-- reduce in %IINVcheck-mx-ty(X.STATE) : (iinvCheck-ty):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0004 sec for 104 rewrites + 508 matches)
**> QED *** IINVcheck-mx-ty * 2
--> ================================================================
--> ****************************************************************
--> 練習問題5.2 [帰納不変条件ex] 解答例開始
--> ****************************************************************
--> ****************************************************************
--> ex: [(A:Aid | Q:Aq) r Sr:As w Sw:As c Sc:As]
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-mx-ex: module for checking on EX
--> ----------------------------------------------------------------
-- defining module IINVcheck-mx-ex
--> ================================================================
--> check (iinvCheck-ex = true) 1
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-mx-ex
:goal { ** root -----------------------------------------
-- context module: IINVcheck-mx-ex
-- sentence to be proved
eq iinvCheck-ex = true .
}
** Initial goal (root) is generated. **
sc=em defined as :csp{eq sc = empS . eq sc = (ac1 sc1) . }
sc1=e defined as :csp{eq sc1 = empS . eq sc1 = (ac2 sc2) . }
a=ac1 defined as :csp{eq a = ac1 . eq (a =a ac1) = false . }
[sc=em]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "1".
[sc1=e]=> :goal{1}
[RD-]=> :goal{1}
[a=ac1]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> ((a in sc1) xor ((a =a ac1) xor ((a =a ac1) and (a in sc1)))),
SS:State |-> ([ q r (a sr) w sw c ((ac1 sc1) -as a) ]), A:Aid |-> a, Q:Aq |-> q,
Sr:As |-> sr, Sc:As |-> (ac1 sc1), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (ac1 sc1) ]) => (
[ q r (a sr) w sw c ((ac1 sc1) -as a) ])) % ((a in sc1) xor ((a =a ac1)
xor ((a =a ac1) and (a in sc1))))) % (((sc1 =< a) and ((a =a ac1) and (sc1
=< empS))) xor (true xor (((((ac1 sc1) -as a) =< (hd q)) and ((((ac1 sc1)
-as a) =< empS) and ((mx ((ac1 sc1) -as a)) and ((q =aq nilQ) and (((hd q)
in ((ac1 sc1) -as a)) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))))))
xor (((mx ((ac1 sc1) -as a)) and ((((ac1 sc1) -as a) =< (hd q)) and ((((ac1 sc1)
-as a) =< empS) and (((hd q) in ((ac1 sc1) -as a)) and ((sc1 =< empS) and ((a
=a ac1) and (sc1 =< a))))))) xor (((mx ((ac1 sc1) -as a)) and ((((ac1 sc1)
-as a) =< empS) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))) xor ((((
hd q) in ((ac1 sc1) -as a)) and ((mx ((ac1 sc1) -as a)) and ((((ac1 sc1)
-as a) =< (hd q)) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))))
xor ((((ac1 sc1) -as a) =< (hd q)) and ((q =aq nilQ) and (((hd q) in ((ac1 sc1)
-as a)) and ((mx ((ac1 sc1) -as a)) and ((a =a ac1) and ((sc1 =< a) and (sc1
=< empS)))))))))))))):Info
{ CC:Bool |-> ((a in sc1) xor ((a =a ac1) xor ((a =a ac1) and (a in sc1)))),
SS:State |-> ([ q r (a sr) w sw c ((ac1 sc1) -as a) ]), A:Aid |-> a, Q:Aq |-> q,
Sr:As |-> sr, Sc:As |-> (ac1 sc1), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (ac1 sc1) ]) => (
[ q r (a sr) w sw c ((ac1 sc1) -as a) ])) % ((a in sc1) xor ((a =a ac1)
xor ((a =a ac1) and (a in sc1))))) % (((sc1 =< a) and ((a =a ac1) and (sc1
=< empS))) xor (true xor (((((ac1 sc1) -as a) =< (hd q)) and ((((ac1 sc1)
-as a) =< empS) and ((mx ((ac1 sc1) -as a)) and ((q =aq nilQ) and (((hd q)
in ((ac1 sc1) -as a)) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))))))
xor (((mx ((ac1 sc1) -as a)) and ((((ac1 sc1) -as a) =< (hd q)) and ((((ac1 sc1)
-as a) =< empS) and (((hd q) in ((ac1 sc1) -as a)) and ((sc1 =< empS) and ((a
=a ac1) and (sc1 =< a))))))) xor (((mx ((ac1 sc1) -as a)) and ((((ac1 sc1)
-as a) =< empS) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))) xor ((((
hd q) in ((ac1 sc1) -as a)) and ((mx ((ac1 sc1) -as a)) and ((((ac1 sc1)
-as a) =< (hd q)) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))))
xor ((((ac1 sc1) -as a) =< (hd q)) and ((q =aq nilQ) and (((hd q) in ((ac1 sc1)
-as a)) and ((mx ((ac1 sc1) -as a)) and ((a =a ac1) and ((sc1 =< a) and (sc1
=< empS)))))))))))))):Info
[sc1=e]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
{ CC:Bool |-> (a =a ac1), SS:State |-> ([ q r (a sr) w sw c (ac1 -as a)
]), A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c ac1 ]) => ([ q r (a sr)
w sw c (ac1 -as a) ])) % (a =a ac1)) % ((ac1 =a a) xor (true xor ((((ac1
-as a) =< (hd q)) and (((ac1 -as a) =< empS) and ((mx (ac1 -as a)) and ((q
=aq nilQ) and (((hd q) in (ac1 -as a)) and (ac1 =a a)))))) xor (((mx (ac1
-as a)) and (((ac1 -as a) =< (hd q)) and (((ac1 -as a) =< empS) and (((hd q)
in (ac1 -as a)) and (ac1 =a a))))) xor (((mx (ac1 -as a)) and (((ac1 -as a)
=< empS) and (ac1 =a a))) xor ((((hd q) in (ac1 -as a)) and ((mx (ac1 -as a))
and (((ac1 -as a) =< (hd q)) and (ac1 =a a)))) xor (((ac1 -as a) =< (hd q))
and ((q =aq nilQ) and (((hd q) in (ac1 -as a)) and ((mx (ac1 -as a)) and (ac1
=a a)))))))))))):Info
{ CC:Bool |-> (a =a ac1), SS:State |-> ([ q r (a sr) w sw c (ac1 -as a)
]), A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c ac1 ]) => ([ q r (a sr)
w sw c (ac1 -as a) ])) % (a =a ac1)) % ((ac1 =a a) xor (true xor ((((ac1
-as a) =< (hd q)) and (((ac1 -as a) =< empS) and ((mx (ac1 -as a)) and ((q
=aq nilQ) and (((hd q) in (ac1 -as a)) and (ac1 =a a)))))) xor (((mx (ac1
-as a)) and (((ac1 -as a) =< (hd q)) and (((ac1 -as a) =< empS) and (((hd q)
in (ac1 -as a)) and (ac1 =a a))))) xor (((mx (ac1 -as a)) and (((ac1 -as a)
=< empS) and (ac1 =a a))) xor ((((hd q) in (ac1 -as a)) and ((mx (ac1 -as a))
and (((ac1 -as a) =< (hd q)) and (ac1 =a a)))) xor (((ac1 -as a) =< (hd q))
and ((q =aq nilQ) and (((hd q) in (ac1 -as a)) and ((mx (ac1 -as a)) and (ac1
=a a)))))))))))):Info
[a=ac1]=> :goal{2-1}
** Generated 2 goals
[RD-]=> :goal{2-1-1}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "2-1-1".
[RD-]=> :goal{2-1-2}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "2-1-2".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "2-2".
[a=ac1]=> :goal{2-2}
[RD-]=> :goal{2-2}
(consumed 0.1042 sec, including 1537 rewrites + 65303 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-mx-ex * 1
--> ================================================================
--> check (iinvCheck-ex = true) 2
--> ----------------------------------------------------------------
--> 1
-- opening module IINVcheck-mx-ex(X.STATE)
-- reduce in %IINVcheck-mx-ex(X.STATE) : (iinvCheck-ex):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0013 sec for 60 rewrites + 1709 matches)
--> 2-1-1
-- opening module IINVcheck-mx-ex(X.STATE)
-- reduce in %IINVcheck-mx-ex(X.STATE) : (iinvCheck-ex):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0003 sec for 68 rewrites + 157 matches)
--> 2-1-2
-- opening module IINVcheck-mx-ex(X.STATE)
-- reduce in %IINVcheck-mx-ex(X.STATE) : (iinvCheck-ex):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0009 sec for 83 rewrites + 1167 matches)
--> 2-2
-- opening module IINVcheck-mx-ex(X.STATE)
-- reduce in %IINVcheck-mx-ex(X.STATE) : (iinvCheck-ex):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0033 sec for 110 rewrites + 4176 matches)
**> QED *** IINVcheck-mx-ex * 2
--> ================================================================
--> ****************************************************************
--> 練習問題5.2 解答例終了
--> ****************************************************************
--> ****************************************************************
--> 5.8.1 未使用定数の宣言と証明規則の定義
--> ****************************************************************
--> ****************************************************************
--> 5.8.2 binspect と bshow
--> ****************************************************************
** Beginning a new proof in IINVcheck-mx-ty
:goal { ** root -----------------------------------------
-- context module: IINVcheck-mx-ty
-- sentence to be proved
eq iinvCheck-ty = true .
}
** Initial goal (root) is generated. **
[RD-]=> :goal{root}
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (a sc) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> sc }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c sc ]) => ([ (a
| q) r sr w sw c (a sc) ])) % true) % (((a in sc) and ((sc =< a) and (mx sc)))
xor (((sc =< empS) and (mx sc)) xor (((sc =< empS) and ((sc =< a) and ((a
in sc) and (mx sc)))) xor (true xor ((mx sc) and ((sc =< empS) and (sc =< a)))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (a sc) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> sc }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c sc ]) => ([ (a
| q) r sr w sw c (a sc) ])) % true) % (((a in sc) and ((sc =< a) and (mx sc)))
xor (((sc =< empS) and (mx sc)) xor (((sc =< empS) and ((sc =< a) and ((a
in sc) and (mx sc)))) xor (true xor ((mx sc) and ((sc =< empS) and (sc =< a)))))))):Info
(consumed 0.0076 sec, including 531 rewrites + 7984 matches)
>> Next target goal is "root".
>> Remaining 1 goal.
(((sc =< a) and ((a in sc) and (mx sc))) xor (((sc =< empS) and (mx sc)) xor (((sc =< empS) and ((sc =< a) and ((a in sc) and (mx sc)))) xor (true xor ((mx sc) and ((sc =< empS) and (sc =< a))))))):Bool
(consumed 0.0001 sec, including 0 rewrites + 85 matches, 10 memo hits)
--> (((mx sc) and (sc =< empS)) xor (true xor (((sc =< empS) and ((sc =< a) and (mx sc))) xor (((sc =< a) and ((mx sc) and ((a in sc) and (sc =< empS)))) xor ((a in sc) and ((mx sc) and (sc =< a)))))))
** Abstracted boolean term:
(consumed 0.000 sec. for abstraction)
((`P-3:Bool and (`P-1:Bool and `P-4:Bool)) xor ((`P-2:Bool and (`P-4 and (`P-1 and `P-3))) xor ((`P-1 and (`P-3 and `P-2)) xor (true xor (`P-2 and `P-1)))))
where
`P-1 = (mx sc)
`P-2 = (sc =< empS)
`P-3 = (sc =< a)
`P-4 = (a in sc)
>> xor ***>
>> and --->
`P-1 = (mx sc)
`P-2 = (sc =< empS)
<----------
>> and --->
`P-1 = (mx sc)
`P-2 = (sc =< empS)
`P-3 = (sc =< a)
<----------
>> and --->
`P-1 = (mx sc)
`P-2 = (sc =< empS)
`P-3 = (sc =< a)
`P-4 = (a in sc)
<----------
>> and --->
`P-1 = (mx sc)
`P-3 = (sc =< a)
`P-4 = (a in sc)
<----------
true
<**********
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-wc-iinv-ps.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-state-lm.cafe
--> ****************************************************************
--> 5.11.1 補題モジュール STATE-lm
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ================================================================
--> モジュールSTATEで,等式
--> cq (A:Aid in (S1:As S2:As)) = (A in S1) or (A in S2)
--> if (not(S1 == empS) and not(S2 == empS)) .
--> が成り立つことを,
--> S:Asに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> module for the proof (proof module)
--> ----------------------------------------------------------------
-- defining module STains1s2
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- defining module STains1s2-base
-- opening module STains1s2-base(X.STATE)
-- reduce in %STains1s2-base(X.STATE) : (ains1s2(a,empS,s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 15 rewrites + 40 matches)
**> QED *** STains1s2 * base * t
-- opening module STains1s2-base(X.STATE)
-- reduce in %STains1s2-base(X.STATE) : (ains1s2(a,empS,s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 15 rewrites + 42 matches)
**> QED *** STains1s2 * base * f
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- defining module STains1s2-step
-- opening module STains1s2-step(X.STATE)
-- reduce in %STains1s2-step(X.STATE) : (ains1s2(a,(a1 s1),s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0003 sec for 41 rewrites + 557 matches)
**> QED *** STains1s2 * step * t
-- opening module STains1s2-step(X.STATE)
-- reduce in %STains1s2-step(X.STATE) : (ains1s2(a,(a1 s1),s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0003 sec for 41 rewrites + 561 matches)
**> QED *** STains1s2 * step * f
--> ================================================================
--> ================================================================
--> モジュールSTATEで,等式
--> eq[s1=<s2]:
--> ((S1:As =< S2:As) and (S1 =< (A:Aid S2))) = (S1 =< S2) .
--> が成り立つことを,
--> S1:Asに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- opening module STATE(X)
-- reduce in %STATE(X) : (((empS =< s2) and (empS =< (a s2))) = (empS =< s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 7 matches)
**> QED *** ST * s1=<s2 * base
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- opening module STATE(X)
-- reduce in %STATE(X) : ((((a1 s1) =< s2) and ((a1 s1) =< (a s2))) = ((a1 s1) =< s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0004 sec for 17 rewrites + 647 matches)
**> QED *** ST * s1=<s2 * step
--> ================================================================
--> ================================================================
--> モジュールSTATEで,等式
--> cq (S1:As =< (A:Aid S2:As)) = S1 =< S2 if (not(A in S1)) .
--> が成り立つことを,
--> S1:Asに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> proof module
--> ----------------------------------------------------------------
-- defining module STs1=<as2
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- opening module STs1=<as2(X.STATE)
-- reduce in %STs1=<as2(X.STATE) : (s1=<as2(empS,a,s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 11 rewrites + 17 matches)
**> QED *** STs1=<as2 * base
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- opening module STs1=<as2(X.STATE)
** Beginning a new proof in %
:goal { ** root -----------------------------------------
-- context module: %
-- sentence to be proved
eq s1=<as2((a1 s1),a,s2) = true .
}
** Initial goal (root) is generated. **
a=a1 defined as :csp{eq a = a1 . eq (a =a a1) = false . }
a1@s2 defined as :csp{eq s2 = (a1 s21) . eq (a1 in s2) = false . }
a@s1 defined as :csp{eq s1 = (a s11) . eq (a in s1) = false . }
[a=a1]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "1".
[a1@s2]=> :goal{1}
[RD-]=> :goal{1}
[a@s1]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
[a1@s2]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[a@s1]=> :goal{2-1}
** Generated 2 goals
[RD-]=> :goal{2-1-1}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "2-1-1".
[RD-]=> :goal{2-1-2}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "2-1-2".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "2-2".
[a@s1]=> :goal{2-2}
[RD-]=> :goal{2-2}
(consumed 0.0071 sec, including 239 rewrites + 2414 matches)
** All goals are successfully discharged.
**> QED *** STs1=<as2 * step
--> ================================================================
--> ----------------------------------------------------------------
--> lemmas on STATE
--> ----------------------------------------------------------------
-- defining module! STATE-lm
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> CNRiinv-wc -- module for defining cnr for inductive invariant
--> ----------------------------------------------------------------
-- defining module CNRiinv-wc
--> ----------------------------------------------------------------
--> IINVcheck-wc -- module for checking invariant/stability
--> ----------------------------------------------------------------
-- defining module IINVcheck-wc
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> wt: [Q r Ar Sr w Sw c Sc]
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-wc-wt: module for checking on WT
--> ----------------------------------------------------------------
-- defining module IINVcheck-wc-wt
--> ================================================================
--> check (iinvCheck-wt = true)
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-wc-wt
:goal { ** root -----------------------------------------
-- context module: IINVcheck-wc-wt
-- sentence to be proved
eq iinvCheck-wt = true .
}
** Initial goal (root) is generated. **
ar!sw defined as :csp{eq (ar in sw) = true . eq (ar in sw) = false . }
ar!sc defined as :csp{eq (ar in sc) = true . eq (ar in sc) = false . }
[ar!sw]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "1".
[ar!sc]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (ar sw) c sc ]), Sr:As
|-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> sc, Sw:As |-> sw }
--> (((### not determined ### ; ([ q r (ar sr) w sw c sc ]) => ([ (q | ar)
r sr w (ar sw) c sc ])) % true) % ((((sc ^ sw) =< empS) and (((sc sw) =< (
q->s q)) and (((q->s q) =< (sc sw)) and (((if (ar in sc) then (ar (sr ^ sc))
else (sr ^ sc) fi) =< empS) and ((sr ^ sw) =< empS))))) xor (true xor (((
q->s q) =< (sw sc)) and (((sw ^ sc) =< empS) and (((sw sc) =< (q->s q))
and (((if (ar in sc) then (ar (sw ^ sc)) else (sw ^ sc) fi) =< empS) and (((sr
^ sw) =< empS) and (((if (ar in sc) then (ar (sr ^ sc)) else (sr ^ sc) fi)
=< empS) and ((sc ^ sr) =< empS)))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (ar sw) c sc ]), Sr:As
|-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> sc, Sw:As |-> sw }
--> (((### not determined ### ; ([ q r (ar sr) w sw c sc ]) => ([ (q | ar)
r sr w (ar sw) c sc ])) % true) % ((((sc ^ sw) =< empS) and (((sc sw) =< (
q->s q)) and (((q->s q) =< (sc sw)) and (((if (ar in sc) then (ar (sr ^ sc))
else (sr ^ sc) fi) =< empS) and ((sr ^ sw) =< empS))))) xor (true xor (((
q->s q) =< (sw sc)) and (((sw ^ sc) =< empS) and (((sw sc) =< (q->s q))
and (((if (ar in sc) then (ar (sw ^ sc)) else (sw ^ sc) fi) =< empS) and (((sr
^ sw) =< empS) and (((if (ar in sc) then (ar (sr ^ sc)) else (sr ^ sc) fi)
=< empS) and ((sc ^ sr) =< empS)))))))))):Info
[ar!sc]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "2-1".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "2-2".
(consumed 0.0653 sec, including 2296 rewrites + 20391 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-wc-wt
--> ****************************************************************
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-wc-ty -- module for checking on TY
--> ----------------------------------------------------------------
-- defining module IINVcheck-wc-ty
--> ================================================================
--> check (iinvCheck-ty = true) (1)
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-wc-ty
:goal { ** root -----------------------------------------
-- context module: IINVcheck-wc-ty
-- sentence to be proved
eq iinvCheck-ty = true .
}
** Initial goal (root) is generated. **
a!sr defined as :csp{eq (a in sr) = true . eq (a in sr) = false . }
a!sc defined as :csp{eq (a in sc) = true . eq (a in sc) = false . }
[a!sr]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "1".
[a!sc]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (a sc) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> sc }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c sc ]) => ([ (a
| q) r sr w sw c (a sc) ])) % true) % ((((if (a in sc) then (a (sw ^ sc))
else (sw ^ sc) fi) =< empS) and (((sw sc) =< (a (q->s q))) and (((q->s q)
=< (a (sc sw))) and (((sc ^ sr) =< empS) and ((sw ^ sr) =< empS))))) xor (true
xor (((sc sw) =< (a (q->s q))) and (((sr ^ sc) =< empS) and (((sr ^ sw)
=< empS) and (((q->s q) =< (a (sc sw))) and (((if (a in sc) then (a (sw ^ sc))
else (sc ^ sw) fi) =< empS) and ((sw ^ sc) =< empS))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (a sc) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> sc }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c sc ]) => ([ (a
| q) r sr w sw c (a sc) ])) % true) % ((((if (a in sc) then (a (sw ^ sc))
else (sw ^ sc) fi) =< empS) and (((sw sc) =< (a (q->s q))) and (((q->s q)
=< (a (sc sw))) and (((sc ^ sr) =< empS) and ((sw ^ sr) =< empS))))) xor (true
xor (((sc sw) =< (a (q->s q))) and (((sr ^ sc) =< empS) and (((sr ^ sw)
=< empS) and (((q->s q) =< (a (sc sw))) and (((if (a in sc) then (a (sw ^ sc))
else (sc ^ sw) fi) =< empS) and ((sw ^ sc) =< empS))))))))):Info
[a!sc]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "2-1".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "2-2".
(consumed 0.0339 sec, including 1078 rewrites + 14392 matches)
** All goals are successfully discharged.
**> QED ** IINVcheck-wc-ty
--> ****************************************************************
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-wc-ex: proof module for checking on EX
--> ----------------------------------------------------------------
-- defining module IINVcheck-wc-ex
--> ================================================================
--> check (iinvCheck-ex = true)
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-wc-ex
:goal { ** root -----------------------------------------
-- context module: IINVcheck-wc-ex
-- sentence to be proved
eq iinvCheck-ex = true .
}
** Initial goal (root) is generated. **
a$sr defined as :csp{eq sr = (a sr-a) . eq (a in sr) = false . }
a$sw defined as :csp{eq sw = (a sw-a) . eq (a in sw) = false . }
a$sc defined as :csp{eq sc = (a sc-a) . eq (a in sc) = false . }
[a$sc]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
{ CC:Bool |-> true, SS:State |-> ([ q r (a sr) w sw c sc-a ]), A:Aid |-> a,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (a sc-a), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (a sc-a) ]) => (
[ q r (a sr) w sw c sc-a ])) % true) % ((((if (a in sw) then (a (sc-a ^ sw))
else (sc-a ^ sw) fi) =< empS) and (((sw sc-a) =< (a (q->s q))) and (((
q->s q) =< (sw sc-a)) and (((if (a in sr) then (a (sc-a ^ sr)) else (sc-a
^ sr) fi) =< empS) and ((sw ^ sr) =< empS))))) xor (true xor (((sc-a sw)
=< (q->s q)) and (((if (a in sw) then (a (sc-a ^ sw)) else (sw ^ sc-a) fi)
=< empS) and (((sr ^ sw) =< empS) and (((if (a in sw) then (a (sr ^ sw))
else (sr ^ sw) fi) =< empS) and (((sr ^ sc-a) =< empS) and (((q->s q) =< (sc-a sw))
and (((sw ^ sc-a) =< empS) and ((if (a in sr) then (a (sc-a ^ sr)) else (sr
^ sc-a) fi) =< empS))))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ q r (a sr) w sw c sc-a ]), A:Aid |-> a,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (a sc-a), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (a sc-a) ]) => (
[ q r (a sr) w sw c sc-a ])) % true) % ((((if (a in sw) then (a (sc-a ^ sw))
else (sc-a ^ sw) fi) =< empS) and (((sw sc-a) =< (a (q->s q))) and (((
q->s q) =< (sw sc-a)) and (((if (a in sr) then (a (sc-a ^ sr)) else (sc-a
^ sr) fi) =< empS) and ((sw ^ sr) =< empS))))) xor (true xor (((sc-a sw)
=< (q->s q)) and (((if (a in sw) then (a (sc-a ^ sw)) else (sw ^ sc-a) fi)
=< empS) and (((sr ^ sw) =< empS) and (((if (a in sw) then (a (sr ^ sw))
else (sr ^ sw) fi) =< empS) and (((sr ^ sc-a) =< empS) and (((q->s q) =< (sc-a sw))
and (((sw ^ sc-a) =< empS) and ((if (a in sr) then (a (sc-a ^ sr)) else (sr
^ sc-a) fi) =< empS))))))))))):Info
[a$sw]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "1-1".
[a$sr]=> :goal{1-1}
[RD-]=> :goal{1-1}
[RD-]=> :goal{1-2}
{ CC:Bool |-> true, SS:State |-> ([ q r (a sr) w sw c sc-a ]), A:Aid |-> a,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (a sc-a), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (a sc-a) ]) => (
[ q r (a sr) w sw c sc-a ])) % true) % ((((sc-a ^ sw) =< empS) and (((sc-a sw)
=< (q->s q)) and (((q->s q) =< (sw sc-a)) and (((if (a in sr) then (a (sc-a
^ sr)) else (sc-a ^ sr) fi) =< empS) and ((sw ^ sr) =< empS))))) xor (true
xor (((sw ^ sc-a) =< empS) and (((q->s q) =< (sw sc-a)) and (((sw ^ sr)
=< empS) and (((sw sc-a) =< (q->s q)) and (((if (a in sr) then (a (sc-a ^ sr))
else (sr ^ sc-a) fi) =< empS) and ((sc-a ^ sr) =< empS))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ q r (a sr) w sw c sc-a ]), A:Aid |-> a,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (a sc-a), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (a sc-a) ]) => (
[ q r (a sr) w sw c sc-a ])) % true) % ((((sc-a ^ sw) =< empS) and (((sc-a sw)
=< (q->s q)) and (((q->s q) =< (sw sc-a)) and (((if (a in sr) then (a (sc-a
^ sr)) else (sc-a ^ sr) fi) =< empS) and ((sw ^ sr) =< empS))))) xor (true
xor (((sw ^ sc-a) =< empS) and (((q->s q) =< (sw sc-a)) and (((sw ^ sr)
=< empS) and (((sw sc-a) =< (q->s q)) and (((if (a in sr) then (a (sc-a ^ sr))
else (sr ^ sc-a) fi) =< empS) and ((sc-a ^ sr) =< empS))))))))):Info
[a$sr]=> :goal{1-2}
** Generated 2 goals
[RD-]=> :goal{1-2-1}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "1-2-1".
[RD-]=> :goal{1-2-2}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "1-2-2".
[RD-]=> :goal{2}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "2".
[a$sw]=> :goal{2}
[RD-]=> :goal{2}
[a$sr]=> :goal{2}
[RD-]=> :goal{2}
(consumed 0.2074 sec, including 4006 rewrites + 33065 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-wc-ex
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> module for lemmas about invariants
--> ----------------------------------------------------------------
-- defining module! INV-lm
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
IINVcheck-wc-ex(X.STATE)> [Leaving CafeOBJ]
========================================
Running: qlock-wc-inv-prp.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:20 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/qlock-wc-inv-prp.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-qtos.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> モジュール'Q->S'
--> ----------------------------------------------------------------
-- defining module! Q->S
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 基本到達特性wcの証明のための5つの不変特性:
--> (r^w S),(w^c S),(r^c S),(q=wc S),(qvr S)
--> を定義するモジュール
--> ----------------------------------------------------------------
-- defining module! WCinvs
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
CafeOBJ> [Leaving CafeOBJ]
========================================
Running: qlock-wc-prp.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:21 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/qlock-wc-prp.cafe
--> ****************************************************************
--> 5.9 遷移システムの到達特性
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 基本到達特性wcを記述するための2つの状態述語:(_inw_),(_inc_)
--> ----------------------------------------------------------------
-- defining module! WCprp
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
CafeOBJ> [Leaving CafeOBJ]
========================================
Running: qlock-wc-ps.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:21 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/qlock-wc-ps.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-prp.cafe
--> ****************************************************************
--> 5.9 遷移システムの到達特性
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 基本到達特性wcを記述するための2つの状態述語:(_inw_),(_inc_)
--> ----------------------------------------------------------------
-- defining module! WCprp
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-wc-inv-lm.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-mx-init-ps.cafe
--> ****************************************************************
--> 5.6 初期状態条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-init-prp.cafe
--> ****************************************************************
--> 5.5 遷移システムの不変特性と帰納不変特性
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 初期状態述語
--> ----------------------------------------------------------------
-- defining module! INITprp
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-mx-inv-prp.cafe
--> ****************************************************************
--> 5.3 検索述語によるシミュレーション
--> 5.5 遷移システムの不変特性と帰納不変特性
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 相互排除性述語(ゴール述語)mx_:共用資源を使用中の実行主体はたかだか一つ
--> ----------------------------------------------------------------
-- defining module! MXprp
--> ----------------------------------------------------------------
--> hq=c_:共用資源を使用中であるであればキューの先頭要素である
--> ----------------------------------------------------------------
-- defining module! HQ=Cprp
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 初期状態条件
--> ----------------------------------------------------------------
-- defining module INITcheck-mx
--> ================================================================
--> check (initCheck = true) 1
--> ----------------------------------------------------------------
** Beginning a new proof in INITcheck-mx
-- reading in file : int
-- reading in file : nat
-- reading in file : nznat
-- done reading in file: nznat
-- done reading in file: nat
-- done reading in file: int
:goal { ** root -----------------------------------------
-- context module: INITcheck-mx
-- sentence to be proved
eq initCheck = true .
}
** Initial goal (root) is generated. **
q=nil defined as :csp{eq q = nilQ . eq q = (a1 | q1) . }
sc=em defined as :csp{eq sc = empS . eq sc = (ac1 sc1) . }
[q=nil]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[sc=em]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-1".
[RD-]=> :goal{1-2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-2".
[RD-]=> :goal{2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "2".
[sc=em]=> :goal{2}
[RD-]=> :goal{2}
(consumed 0.0056 sec, including 197 rewrites + 1516 matches)
** All goals are successfully discharged.
**> QED *** INITcheck-mx * 1
--> ================================================================
--> ================================================================
--> check (initCheck = true) 2
--> ----------------------------------------------------------------
--> 1-1
-- opening module INITcheck-mx(X.STATE)
-- reduce in %INITcheck-mx(X.STATE) : (initCheck):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 37 rewrites + 126 matches)
--> 1-2
-- opening module INITcheck-mx(X.STATE)
-- reduce in %INITcheck-mx(X.STATE) : (initCheck):Bool
(true):Bool
(0.0000 sec for parse, 0.0003 sec for 60 rewrites + 502 matches)
--> 2
-- opening module INITcheck-mx(X.STATE)
-- reduce in %INITcheck-mx(X.STATE) : (initCheck):Bool
(true):Bool
(0.0000 sec for parse, 0.0002 sec for 35 rewrites + 398 matches)
**> QED *** INITcheck-mx * 2
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-wc-init-ps.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-inv-prp.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-qtos.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> モジュール'Q->S'
--> ----------------------------------------------------------------
-- defining module! Q->S
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 基本到達特性wcの証明のための5つの不変特性:
--> (r^w S),(w^c S),(r^c S),(q=wc S),(qvr S)
--> を定義するモジュール
--> ----------------------------------------------------------------
-- defining module! WCinvs
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 初期状態条件のチェックのためのモジュール
--> ----------------------------------------------------------------
-- defining module INITcheck-wc
--> ================================================================
--> check (initCheck = true)
--> ----------------------------------------------------------------
** Beginning a new proof in INITcheck-wc
:goal { ** root -----------------------------------------
-- context module: INITcheck-wc
-- sentence to be proved
eq initCheck = true .
}
** Initial goal (root) is generated. **
q=nil defined as :csp{eq q = nilQ . eq (q =aq nilQ) = false . }
sr=em defined as :csp{eq sr = empS . eq (sr =as empS) = false . }
sw=em defined as :csp{eq sw = empS . eq (sw =as empS) = false . }
sc=em defined as :csp{eq sc = empS . eq (sc =as empS) = false . }
[q=nil]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[sr=em]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-1".
[sw=em]=> :goal{1-1}
[RD-]=> :goal{1-1}
[sc=em]=> :goal{1-1}
[RD-]=> :goal{1-1}
[RD-]=> :goal{1-2}
[sw=em]=> :goal{1-2}
** Generated 2 goals
[RD-]=> :goal{1-2-1}
[sc=em]=> :goal{1-2-1}
** Generated 2 goals
[RD-]=> :goal{1-2-1-1}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-2-1-1".
[RD-]=> :goal{1-2-1-2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-2-1-2".
[RD-]=> :goal{1-2-2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "1-2-2".
[sc=em]=> :goal{1-2-2}
[RD-]=> :goal{1-2-2}
[RD-]=> :goal{2}
[RD-] discharged:
eq initCheck = true
[RD-] discharged goal "2".
[sr=em]=> :goal{2}
[RD-]=> :goal{2}
[sw=em]=> :goal{2}
[RD-]=> :goal{2}
[sc=em]=> :goal{2}
[RD-]=> :goal{2}
(consumed 0.0130 sec, including 525 rewrites + 4622 matches)
** All goals are successfully discharged.
**> QED *** INITcheck-wc
--> ================================================================
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-mx-iinv-ps.cafe
--> ****************************************************************
--> 5.8 帰納不変条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./check-cnr.cafe
--> ****************************************************************
--> 5.7 検索述語による遷移の検索
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
-- defining module CNR
--> ----------------------------------------------------------------
--> module for defining check-cnr
--> ----------------------------------------------------------------
-- defining module CHECKcnr
-- reading in file : rwl
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/rwl.cafe
-- defining module! RWL
-- done reading in file: rwl
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-tr-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 待ち行列の最後に入る状態遷移 (WT: want transition)
--> ----------------------------------------------------------------
-- defining module! WTtr
--> ----------------------------------------------------------------
--> 待ち行列の先頭にきたら共有資源を使う状態遷移 (TY: try transition)
--> ----------------------------------------------------------------
-- defining module! TYtr
--> ----------------------------------------------------------------
--> 共有資源を使い終わったら待ち行列を離れる状態遷移 (EX: exit transition)
--> ----------------------------------------------------------------
-- defining module! EXtr
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 状態述語((mx S:State) and (hq=c S))が
--> 1段の遷移で不変であることを規定した現状態/次状態関係述語cnr-iinv
--> ----------------------------------------------------------------
-- defining module CNRiinv-mx
--> ----------------------------------------------------------------
--> 述語cnr-iinvが任意の遷移について成り立つかをチェックする述語check-iinv
--> ----------------------------------------------------------------
-- defining module IINVcheck-mx
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> 練習問題5.1 [帰納不変条件wt] 解答例開始
--> ****************************************************************
--> ****************************************************************
--> wt: [Q:Aq r (Ar:Aid Sr:As) w Sw:As c Sc:As]
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-wt: module for checking on WT
--> ----------------------------------------------------------------
-- defining module IINVcheck-mx-wt
--> ================================================================
--> check (iinvCheck-wt = true) 1
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-mx-wt
:goal { ** root -----------------------------------------
-- context module: IINVcheck-mx-wt
-- sentence to be proved
eq iinvCheck-wt = true .
}
** Initial goal (root) is generated. **
q=nil defined as :csp{eq q = nilQ . eq q = (a1 | q1) . }
[q=nil]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "1".
[RD-]=> :goal{2}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "2".
(consumed 0.0135 sec, including 119 rewrites + 1594 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-mx-wt * 1
--> ================================================================
--> check (iinvCheck-wt = true) 2
--> ----------------------------------------------------------------
--> 1
-- opening module IINVcheck-mx-wt(X.STATE)
-- reduce in %IINVcheck-mx-wt(X.STATE) : (iinvCheck-wt):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0006 sec for 60 rewrites + 778 matches)
--> 2
-- opening module IINVcheck-mx-wt(X.STATE)
-- reduce in %IINVcheck-mx-wt(X.STATE) : (iinvCheck-wt):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0007 sec for 57 rewrites + 812 matches)
**> QED *** IINVcheck-mx-wt * 2
--> ****************************************************************
--> 練習問題5.1 解答例終了
--> ****************************************************************
--> ****************************************************************
--> ty: [(A:Aid | Q:Aq) r Sr:As w (A:Aid Sw:As) c Sc:As]
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-ty -- module for checking on TY
--> ----------------------------------------------------------------
-- defining module IINVcheck-mx-ty
--> ================================================================
--> check (iinvCheck-ty = true) 1
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-mx-ty
:goal { ** root -----------------------------------------
-- context module: IINVcheck-mx-ty
-- sentence to be proved
eq iinvCheck-ty = true .
}
** Initial goal (root) is generated. **
sc=em defined as :csp{eq sc = empS . eq sc = (ac1 sc1) . }
a=ac1 defined as :csp{eq a = ac1 . eq (a =a ac1) = false . }
[sc=em]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "1".
[a=ac1]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (ac1 (a sc1)) ]),
Sw:As |-> sw, A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (ac1 sc1) }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c (ac1 sc1) ])
=> ([ (a | q) r sr w sw c (a (ac1 sc1)) ])) % true) % (true xor ((a =a ac1)
and ((sc1 =< empS) and (sc1 =< a))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (ac1 (a sc1)) ]),
Sw:As |-> sw, A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (ac1 sc1) }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c (ac1 sc1) ])
=> ([ (a | q) r sr w sw c (a (ac1 sc1)) ])) % true) % (true xor ((a =a ac1)
and ((sc1 =< empS) and (sc1 =< a))))):Info
[a=ac1]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "2-1".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "2-2".
(consumed 0.0300 sec, including 1005 rewrites + 8105 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-mx-ty * 1
--> ================================================================
--> check (iinvCheck-ty = true) 2
--> ----------------------------------------------------------------
--> 1
-- opening module IINVcheck-mx-ty(X.STATE)
-- reduce in %IINVcheck-mx-ty(X.STATE) : (iinvCheck-ty):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0002 sec for 60 rewrites + 164 matches)
--> 2-1
-- opening module IINVcheck-mx-ty(X.STATE)
-- reduce in %IINVcheck-mx-ty(X.STATE) : (iinvCheck-ty):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0004 sec for 95 rewrites + 467 matches)
--> 2-2
-- opening module IINVcheck-mx-ty(X.STATE)
-- reduce in %IINVcheck-mx-ty(X.STATE) : (iinvCheck-ty):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0005 sec for 104 rewrites + 508 matches)
**> QED *** IINVcheck-mx-ty * 2
--> ================================================================
--> ****************************************************************
--> 練習問題5.2 [帰納不変条件ex] 解答例開始
--> ****************************************************************
--> ****************************************************************
--> ex: [(A:Aid | Q:Aq) r Sr:As w Sw:As c Sc:As]
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-mx-ex: module for checking on EX
--> ----------------------------------------------------------------
-- defining module IINVcheck-mx-ex
--> ================================================================
--> check (iinvCheck-ex = true) 1
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-mx-ex
:goal { ** root -----------------------------------------
-- context module: IINVcheck-mx-ex
-- sentence to be proved
eq iinvCheck-ex = true .
}
** Initial goal (root) is generated. **
sc=em defined as :csp{eq sc = empS . eq sc = (ac1 sc1) . }
sc1=e defined as :csp{eq sc1 = empS . eq sc1 = (ac2 sc2) . }
a=ac1 defined as :csp{eq a = ac1 . eq (a =a ac1) = false . }
[sc=em]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "1".
[sc1=e]=> :goal{1}
[RD-]=> :goal{1}
[a=ac1]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> ((a in sc1) xor ((a =a ac1) xor ((a =a ac1) and (a in sc1)))),
SS:State |-> ([ q r (a sr) w sw c ((ac1 sc1) -as a) ]), A:Aid |-> a, Q:Aq |-> q,
Sr:As |-> sr, Sc:As |-> (ac1 sc1), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (ac1 sc1) ]) => (
[ q r (a sr) w sw c ((ac1 sc1) -as a) ])) % ((a in sc1) xor ((a =a ac1)
xor ((a =a ac1) and (a in sc1))))) % (((sc1 =< a) and ((a =a ac1) and (sc1
=< empS))) xor (true xor (((((ac1 sc1) -as a) =< (hd q)) and ((((ac1 sc1)
-as a) =< empS) and ((mx ((ac1 sc1) -as a)) and ((q =aq nilQ) and (((hd q)
in ((ac1 sc1) -as a)) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))))))
xor (((mx ((ac1 sc1) -as a)) and ((((ac1 sc1) -as a) =< (hd q)) and ((((ac1 sc1)
-as a) =< empS) and (((hd q) in ((ac1 sc1) -as a)) and ((sc1 =< empS) and ((a
=a ac1) and (sc1 =< a))))))) xor (((mx ((ac1 sc1) -as a)) and ((((ac1 sc1)
-as a) =< empS) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))) xor ((((
hd q) in ((ac1 sc1) -as a)) and ((mx ((ac1 sc1) -as a)) and ((((ac1 sc1)
-as a) =< (hd q)) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))))
xor ((((ac1 sc1) -as a) =< (hd q)) and ((q =aq nilQ) and (((hd q) in ((ac1 sc1)
-as a)) and ((mx ((ac1 sc1) -as a)) and ((a =a ac1) and ((sc1 =< a) and (sc1
=< empS)))))))))))))):Info
{ CC:Bool |-> ((a in sc1) xor ((a =a ac1) xor ((a =a ac1) and (a in sc1)))),
SS:State |-> ([ q r (a sr) w sw c ((ac1 sc1) -as a) ]), A:Aid |-> a, Q:Aq |-> q,
Sr:As |-> sr, Sc:As |-> (ac1 sc1), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (ac1 sc1) ]) => (
[ q r (a sr) w sw c ((ac1 sc1) -as a) ])) % ((a in sc1) xor ((a =a ac1)
xor ((a =a ac1) and (a in sc1))))) % (((sc1 =< a) and ((a =a ac1) and (sc1
=< empS))) xor (true xor (((((ac1 sc1) -as a) =< (hd q)) and ((((ac1 sc1)
-as a) =< empS) and ((mx ((ac1 sc1) -as a)) and ((q =aq nilQ) and (((hd q)
in ((ac1 sc1) -as a)) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))))))
xor (((mx ((ac1 sc1) -as a)) and ((((ac1 sc1) -as a) =< (hd q)) and ((((ac1 sc1)
-as a) =< empS) and (((hd q) in ((ac1 sc1) -as a)) and ((sc1 =< empS) and ((a
=a ac1) and (sc1 =< a))))))) xor (((mx ((ac1 sc1) -as a)) and ((((ac1 sc1)
-as a) =< empS) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))) xor ((((
hd q) in ((ac1 sc1) -as a)) and ((mx ((ac1 sc1) -as a)) and ((((ac1 sc1)
-as a) =< (hd q)) and ((sc1 =< a) and ((sc1 =< empS) and (a =a ac1))))))
xor ((((ac1 sc1) -as a) =< (hd q)) and ((q =aq nilQ) and (((hd q) in ((ac1 sc1)
-as a)) and ((mx ((ac1 sc1) -as a)) and ((a =a ac1) and ((sc1 =< a) and (sc1
=< empS)))))))))))))):Info
[sc1=e]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
{ CC:Bool |-> (a =a ac1), SS:State |-> ([ q r (a sr) w sw c (ac1 -as a)
]), A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c ac1 ]) => ([ q r (a sr)
w sw c (ac1 -as a) ])) % (a =a ac1)) % ((ac1 =a a) xor (true xor ((((ac1
-as a) =< (hd q)) and (((ac1 -as a) =< empS) and ((mx (ac1 -as a)) and ((q
=aq nilQ) and (((hd q) in (ac1 -as a)) and (ac1 =a a)))))) xor (((mx (ac1
-as a)) and (((ac1 -as a) =< (hd q)) and (((ac1 -as a) =< empS) and (((hd q)
in (ac1 -as a)) and (ac1 =a a))))) xor (((mx (ac1 -as a)) and (((ac1 -as a)
=< empS) and (ac1 =a a))) xor ((((hd q) in (ac1 -as a)) and ((mx (ac1 -as a))
and (((ac1 -as a) =< (hd q)) and (ac1 =a a)))) xor (((ac1 -as a) =< (hd q))
and ((q =aq nilQ) and (((hd q) in (ac1 -as a)) and ((mx (ac1 -as a)) and (ac1
=a a)))))))))))):Info
{ CC:Bool |-> (a =a ac1), SS:State |-> ([ q r (a sr) w sw c (ac1 -as a)
]), A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c ac1 ]) => ([ q r (a sr)
w sw c (ac1 -as a) ])) % (a =a ac1)) % ((ac1 =a a) xor (true xor ((((ac1
-as a) =< (hd q)) and (((ac1 -as a) =< empS) and ((mx (ac1 -as a)) and ((q
=aq nilQ) and (((hd q) in (ac1 -as a)) and (ac1 =a a)))))) xor (((mx (ac1
-as a)) and (((ac1 -as a) =< (hd q)) and (((ac1 -as a) =< empS) and (((hd q)
in (ac1 -as a)) and (ac1 =a a))))) xor (((mx (ac1 -as a)) and (((ac1 -as a)
=< empS) and (ac1 =a a))) xor ((((hd q) in (ac1 -as a)) and ((mx (ac1 -as a))
and (((ac1 -as a) =< (hd q)) and (ac1 =a a)))) xor (((ac1 -as a) =< (hd q))
and ((q =aq nilQ) and (((hd q) in (ac1 -as a)) and ((mx (ac1 -as a)) and (ac1
=a a)))))))))))):Info
[a=ac1]=> :goal{2-1}
** Generated 2 goals
[RD-]=> :goal{2-1-1}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "2-1-1".
[RD-]=> :goal{2-1-2}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "2-1-2".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "2-2".
[a=ac1]=> :goal{2-2}
[RD-]=> :goal{2-2}
(consumed 0.1040 sec, including 1537 rewrites + 65303 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-mx-ex * 1
--> ================================================================
--> check (iinvCheck-ex = true) 2
--> ----------------------------------------------------------------
--> 1
-- opening module IINVcheck-mx-ex(X.STATE)
-- reduce in %IINVcheck-mx-ex(X.STATE) : (iinvCheck-ex):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0013 sec for 60 rewrites + 1709 matches)
--> 2-1-1
-- opening module IINVcheck-mx-ex(X.STATE)
-- reduce in %IINVcheck-mx-ex(X.STATE) : (iinvCheck-ex):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0003 sec for 68 rewrites + 157 matches)
--> 2-1-2
-- opening module IINVcheck-mx-ex(X.STATE)
-- reduce in %IINVcheck-mx-ex(X.STATE) : (iinvCheck-ex):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0009 sec for 83 rewrites + 1167 matches)
--> 2-2
-- opening module IINVcheck-mx-ex(X.STATE)
-- reduce in %IINVcheck-mx-ex(X.STATE) : (iinvCheck-ex):Bool
** No more possible transitions.
(true):Bool
(0.0000 sec for parse, 0.0032 sec for 110 rewrites + 4176 matches)
**> QED *** IINVcheck-mx-ex * 2
--> ================================================================
--> ****************************************************************
--> 練習問題5.2 解答例終了
--> ****************************************************************
--> ****************************************************************
--> 5.8.1 未使用定数の宣言と証明規則の定義
--> ****************************************************************
--> ****************************************************************
--> 5.8.2 binspect と bshow
--> ****************************************************************
** Beginning a new proof in IINVcheck-mx-ty
:goal { ** root -----------------------------------------
-- context module: IINVcheck-mx-ty
-- sentence to be proved
eq iinvCheck-ty = true .
}
** Initial goal (root) is generated. **
[RD-]=> :goal{root}
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (a sc) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> sc }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c sc ]) => ([ (a
| q) r sr w sw c (a sc) ])) % true) % (((a in sc) and ((sc =< a) and (mx sc)))
xor (((sc =< empS) and (mx sc)) xor (((sc =< empS) and ((sc =< a) and ((a
in sc) and (mx sc)))) xor (true xor ((mx sc) and ((sc =< empS) and (sc =< a)))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (a sc) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> sc }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c sc ]) => ([ (a
| q) r sr w sw c (a sc) ])) % true) % (((a in sc) and ((sc =< a) and (mx sc)))
xor (((sc =< empS) and (mx sc)) xor (((sc =< empS) and ((sc =< a) and ((a
in sc) and (mx sc)))) xor (true xor ((mx sc) and ((sc =< empS) and (sc =< a)))))))):Info
(consumed 0.0076 sec, including 531 rewrites + 7984 matches)
>> Next target goal is "root".
>> Remaining 1 goal.
(((sc =< a) and ((a in sc) and (mx sc))) xor (((sc =< empS) and (mx sc)) xor (((sc =< empS) and ((sc =< a) and ((a in sc) and (mx sc)))) xor (true xor ((mx sc) and ((sc =< empS) and (sc =< a))))))):Bool
(consumed 0.0001 sec, including 0 rewrites + 85 matches, 10 memo hits)
--> (((mx sc) and (sc =< empS)) xor (true xor (((sc =< empS) and ((sc =< a) and (mx sc))) xor (((sc =< a) and ((mx sc) and ((a in sc) and (sc =< empS)))) xor ((a in sc) and ((mx sc) and (sc =< a)))))))
** Abstracted boolean term:
(consumed 0.000 sec. for abstraction)
((`P-3:Bool and (`P-1:Bool and `P-4:Bool)) xor ((`P-2:Bool and (`P-4 and (`P-1 and `P-3))) xor ((`P-1 and (`P-3 and `P-2)) xor (true xor (`P-2 and `P-1)))))
where
`P-1 = (mx sc)
`P-2 = (sc =< empS)
`P-3 = (sc =< a)
`P-4 = (a in sc)
>> xor ***>
>> and --->
`P-1 = (mx sc)
`P-2 = (sc =< empS)
<----------
>> and --->
`P-1 = (mx sc)
`P-2 = (sc =< empS)
`P-3 = (sc =< a)
<----------
>> and --->
`P-1 = (mx sc)
`P-2 = (sc =< empS)
`P-3 = (sc =< a)
`P-4 = (a in sc)
<----------
>> and --->
`P-1 = (mx sc)
`P-3 = (sc =< a)
`P-4 = (a in sc)
<----------
true
<**********
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-wc-iinv-ps.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-state-lm.cafe
--> ****************************************************************
--> 5.11.1 補題モジュール STATE-lm
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ================================================================
--> モジュールSTATEで,等式
--> cq (A:Aid in (S1:As S2:As)) = (A in S1) or (A in S2)
--> if (not(S1 == empS) and not(S2 == empS)) .
--> が成り立つことを,
--> S:Asに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> module for the proof (proof module)
--> ----------------------------------------------------------------
-- defining module STains1s2
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- defining module STains1s2-base
-- opening module STains1s2-base(X.STATE)
-- reduce in %STains1s2-base(X.STATE) : (ains1s2(a,empS,s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 15 rewrites + 40 matches)
**> QED *** STains1s2 * base * t
-- opening module STains1s2-base(X.STATE)
-- reduce in %STains1s2-base(X.STATE) : (ains1s2(a,empS,s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 15 rewrites + 42 matches)
**> QED *** STains1s2 * base * f
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- defining module STains1s2-step
-- opening module STains1s2-step(X.STATE)
-- reduce in %STains1s2-step(X.STATE) : (ains1s2(a,(a1 s1),s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0003 sec for 41 rewrites + 557 matches)
**> QED *** STains1s2 * step * t
-- opening module STains1s2-step(X.STATE)
-- reduce in %STains1s2-step(X.STATE) : (ains1s2(a,(a1 s1),s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0003 sec for 41 rewrites + 561 matches)
**> QED *** STains1s2 * step * f
--> ================================================================
--> ================================================================
--> モジュールSTATEで,等式
--> eq[s1=<s2]:
--> ((S1:As =< S2:As) and (S1 =< (A:Aid S2))) = (S1 =< S2) .
--> が成り立つことを,
--> S1:Asに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- opening module STATE(X)
-- reduce in %STATE(X) : (((empS =< s2) and (empS =< (a s2))) = (empS =< s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 7 matches)
**> QED *** ST * s1=<s2 * base
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- opening module STATE(X)
-- reduce in %STATE(X) : ((((a1 s1) =< s2) and ((a1 s1) =< (a s2))) = ((a1 s1) =< s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0004 sec for 17 rewrites + 647 matches)
**> QED *** ST * s1=<s2 * step
--> ================================================================
--> ================================================================
--> モジュールSTATEで,等式
--> cq (S1:As =< (A:Aid S2:As)) = S1 =< S2 if (not(A in S1)) .
--> が成り立つことを,
--> S1:Asに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> proof module
--> ----------------------------------------------------------------
-- defining module STs1=<as2
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- opening module STs1=<as2(X.STATE)
-- reduce in %STs1=<as2(X.STATE) : (s1=<as2(empS,a,s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 11 rewrites + 17 matches)
**> QED *** STs1=<as2 * base
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- opening module STs1=<as2(X.STATE)
** Beginning a new proof in %
:goal { ** root -----------------------------------------
-- context module: %
-- sentence to be proved
eq s1=<as2((a1 s1),a,s2) = true .
}
** Initial goal (root) is generated. **
a=a1 defined as :csp{eq a = a1 . eq (a =a a1) = false . }
a1@s2 defined as :csp{eq s2 = (a1 s21) . eq (a1 in s2) = false . }
a@s1 defined as :csp{eq s1 = (a s11) . eq (a in s1) = false . }
[a=a1]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "1".
[a1@s2]=> :goal{1}
[RD-]=> :goal{1}
[a@s1]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
[a1@s2]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[a@s1]=> :goal{2-1}
** Generated 2 goals
[RD-]=> :goal{2-1-1}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "2-1-1".
[RD-]=> :goal{2-1-2}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "2-1-2".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "2-2".
[a@s1]=> :goal{2-2}
[RD-]=> :goal{2-2}
(consumed 0.0071 sec, including 239 rewrites + 2414 matches)
** All goals are successfully discharged.
**> QED *** STs1=<as2 * step
--> ================================================================
--> ----------------------------------------------------------------
--> lemmas on STATE
--> ----------------------------------------------------------------
-- defining module! STATE-lm
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> CNRiinv-wc -- module for defining cnr for inductive invariant
--> ----------------------------------------------------------------
-- defining module CNRiinv-wc
--> ----------------------------------------------------------------
--> IINVcheck-wc -- module for checking invariant/stability
--> ----------------------------------------------------------------
-- defining module IINVcheck-wc
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> wt: [Q r Ar Sr w Sw c Sc]
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-wc-wt: module for checking on WT
--> ----------------------------------------------------------------
-- defining module IINVcheck-wc-wt
--> ================================================================
--> check (iinvCheck-wt = true)
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-wc-wt
:goal { ** root -----------------------------------------
-- context module: IINVcheck-wc-wt
-- sentence to be proved
eq iinvCheck-wt = true .
}
** Initial goal (root) is generated. **
ar!sw defined as :csp{eq (ar in sw) = true . eq (ar in sw) = false . }
ar!sc defined as :csp{eq (ar in sc) = true . eq (ar in sc) = false . }
[ar!sw]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "1".
[ar!sc]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (ar sw) c sc ]), Sr:As
|-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> sc, Sw:As |-> sw }
--> (((### not determined ### ; ([ q r (ar sr) w sw c sc ]) => ([ (q | ar)
r sr w (ar sw) c sc ])) % true) % ((((sc ^ sw) =< empS) and (((sc sw) =< (
q->s q)) and (((q->s q) =< (sc sw)) and (((if (ar in sc) then (ar (sr ^ sc))
else (sr ^ sc) fi) =< empS) and ((sr ^ sw) =< empS))))) xor (true xor (((
q->s q) =< (sw sc)) and (((sw ^ sc) =< empS) and (((sw sc) =< (q->s q))
and (((if (ar in sc) then (ar (sw ^ sc)) else (sw ^ sc) fi) =< empS) and (((sr
^ sw) =< empS) and (((if (ar in sc) then (ar (sr ^ sc)) else (sr ^ sc) fi)
=< empS) and ((sc ^ sr) =< empS)))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (ar sw) c sc ]), Sr:As
|-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> sc, Sw:As |-> sw }
--> (((### not determined ### ; ([ q r (ar sr) w sw c sc ]) => ([ (q | ar)
r sr w (ar sw) c sc ])) % true) % ((((sc ^ sw) =< empS) and (((sc sw) =< (
q->s q)) and (((q->s q) =< (sc sw)) and (((if (ar in sc) then (ar (sr ^ sc))
else (sr ^ sc) fi) =< empS) and ((sr ^ sw) =< empS))))) xor (true xor (((
q->s q) =< (sw sc)) and (((sw ^ sc) =< empS) and (((sw sc) =< (q->s q))
and (((if (ar in sc) then (ar (sw ^ sc)) else (sw ^ sc) fi) =< empS) and (((sr
^ sw) =< empS) and (((if (ar in sc) then (ar (sr ^ sc)) else (sr ^ sc) fi)
=< empS) and ((sc ^ sr) =< empS)))))))))):Info
[ar!sc]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "2-1".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iinvCheck-wt = true
[RD-] discharged goal "2-2".
(consumed 0.0665 sec, including 2296 rewrites + 20391 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-wc-wt
--> ****************************************************************
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-wc-ty -- module for checking on TY
--> ----------------------------------------------------------------
-- defining module IINVcheck-wc-ty
--> ================================================================
--> check (iinvCheck-ty = true) (1)
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-wc-ty
:goal { ** root -----------------------------------------
-- context module: IINVcheck-wc-ty
-- sentence to be proved
eq iinvCheck-ty = true .
}
** Initial goal (root) is generated. **
a!sr defined as :csp{eq (a in sr) = true . eq (a in sr) = false . }
a!sc defined as :csp{eq (a in sc) = true . eq (a in sc) = false . }
[a!sr]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "1".
[a!sc]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (a sc) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> sc }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c sc ]) => ([ (a
| q) r sr w sw c (a sc) ])) % true) % ((((if (a in sc) then (a (sw ^ sc))
else (sw ^ sc) fi) =< empS) and (((sw sc) =< (a (q->s q))) and (((q->s q)
=< (a (sc sw))) and (((sc ^ sr) =< empS) and ((sw ^ sr) =< empS))))) xor (true
xor (((sc sw) =< (a (q->s q))) and (((sr ^ sc) =< empS) and (((sr ^ sw)
=< empS) and (((q->s q) =< (a (sc sw))) and (((if (a in sc) then (a (sw ^ sc))
else (sc ^ sw) fi) =< empS) and ((sw ^ sc) =< empS))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (a sc) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> sc }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c sc ]) => ([ (a
| q) r sr w sw c (a sc) ])) % true) % ((((if (a in sc) then (a (sw ^ sc))
else (sw ^ sc) fi) =< empS) and (((sw sc) =< (a (q->s q))) and (((q->s q)
=< (a (sc sw))) and (((sc ^ sr) =< empS) and ((sw ^ sr) =< empS))))) xor (true
xor (((sc sw) =< (a (q->s q))) and (((sr ^ sc) =< empS) and (((sr ^ sw)
=< empS) and (((q->s q) =< (a (sc sw))) and (((if (a in sc) then (a (sw ^ sc))
else (sc ^ sw) fi) =< empS) and ((sw ^ sc) =< empS))))))))):Info
[a!sc]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "2-1".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq iinvCheck-ty = true
[RD-] discharged goal "2-2".
(consumed 0.0349 sec, including 1078 rewrites + 14392 matches)
** All goals are successfully discharged.
**> QED ** IINVcheck-wc-ty
--> ****************************************************************
--> ****************************************************************
--> ----------------------------------------------------------------
--> IINVcheck-wc-ex: proof module for checking on EX
--> ----------------------------------------------------------------
-- defining module IINVcheck-wc-ex
--> ================================================================
--> check (iinvCheck-ex = true)
--> ----------------------------------------------------------------
** Beginning a new proof in IINVcheck-wc-ex
:goal { ** root -----------------------------------------
-- context module: IINVcheck-wc-ex
-- sentence to be proved
eq iinvCheck-ex = true .
}
** Initial goal (root) is generated. **
a$sr defined as :csp{eq sr = (a sr-a) . eq (a in sr) = false . }
a$sw defined as :csp{eq sw = (a sw-a) . eq (a in sw) = false . }
a$sc defined as :csp{eq sc = (a sc-a) . eq (a in sc) = false . }
[a$sc]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
{ CC:Bool |-> true, SS:State |-> ([ q r (a sr) w sw c sc-a ]), A:Aid |-> a,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (a sc-a), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (a sc-a) ]) => (
[ q r (a sr) w sw c sc-a ])) % true) % ((((if (a in sw) then (a (sc-a ^ sw))
else (sc-a ^ sw) fi) =< empS) and (((sw sc-a) =< (a (q->s q))) and (((
q->s q) =< (sw sc-a)) and (((if (a in sr) then (a (sc-a ^ sr)) else (sc-a
^ sr) fi) =< empS) and ((sw ^ sr) =< empS))))) xor (true xor (((sc-a sw)
=< (q->s q)) and (((if (a in sw) then (a (sc-a ^ sw)) else (sw ^ sc-a) fi)
=< empS) and (((sr ^ sw) =< empS) and (((if (a in sw) then (a (sr ^ sw))
else (sr ^ sw) fi) =< empS) and (((sr ^ sc-a) =< empS) and (((q->s q) =< (sc-a sw))
and (((sw ^ sc-a) =< empS) and ((if (a in sr) then (a (sc-a ^ sr)) else (sr
^ sc-a) fi) =< empS))))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ q r (a sr) w sw c sc-a ]), A:Aid |-> a,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (a sc-a), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (a sc-a) ]) => (
[ q r (a sr) w sw c sc-a ])) % true) % ((((if (a in sw) then (a (sc-a ^ sw))
else (sc-a ^ sw) fi) =< empS) and (((sw sc-a) =< (a (q->s q))) and (((
q->s q) =< (sw sc-a)) and (((if (a in sr) then (a (sc-a ^ sr)) else (sc-a
^ sr) fi) =< empS) and ((sw ^ sr) =< empS))))) xor (true xor (((sc-a sw)
=< (q->s q)) and (((if (a in sw) then (a (sc-a ^ sw)) else (sw ^ sc-a) fi)
=< empS) and (((sr ^ sw) =< empS) and (((if (a in sw) then (a (sr ^ sw))
else (sr ^ sw) fi) =< empS) and (((sr ^ sc-a) =< empS) and (((q->s q) =< (sc-a sw))
and (((sw ^ sc-a) =< empS) and ((if (a in sr) then (a (sc-a ^ sr)) else (sr
^ sc-a) fi) =< empS))))))))))):Info
[a$sw]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "1-1".
[a$sr]=> :goal{1-1}
[RD-]=> :goal{1-1}
[RD-]=> :goal{1-2}
{ CC:Bool |-> true, SS:State |-> ([ q r (a sr) w sw c sc-a ]), A:Aid |-> a,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (a sc-a), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (a sc-a) ]) => (
[ q r (a sr) w sw c sc-a ])) % true) % ((((sc-a ^ sw) =< empS) and (((sc-a sw)
=< (q->s q)) and (((q->s q) =< (sw sc-a)) and (((if (a in sr) then (a (sc-a
^ sr)) else (sc-a ^ sr) fi) =< empS) and ((sw ^ sr) =< empS))))) xor (true
xor (((sw ^ sc-a) =< empS) and (((q->s q) =< (sw sc-a)) and (((sw ^ sr)
=< empS) and (((sw sc-a) =< (q->s q)) and (((if (a in sr) then (a (sc-a ^ sr))
else (sr ^ sc-a) fi) =< empS) and ((sc-a ^ sr) =< empS))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ q r (a sr) w sw c sc-a ]), A:Aid |-> a,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (a sc-a), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (a sc-a) ]) => (
[ q r (a sr) w sw c sc-a ])) % true) % ((((sc-a ^ sw) =< empS) and (((sc-a sw)
=< (q->s q)) and (((q->s q) =< (sw sc-a)) and (((if (a in sr) then (a (sc-a
^ sr)) else (sc-a ^ sr) fi) =< empS) and ((sw ^ sr) =< empS))))) xor (true
xor (((sw ^ sc-a) =< empS) and (((q->s q) =< (sw sc-a)) and (((sw ^ sr)
=< empS) and (((sw sc-a) =< (q->s q)) and (((if (a in sr) then (a (sc-a ^ sr))
else (sr ^ sc-a) fi) =< empS) and ((sc-a ^ sr) =< empS))))))))):Info
[a$sr]=> :goal{1-2}
** Generated 2 goals
[RD-]=> :goal{1-2-1}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "1-2-1".
[RD-]=> :goal{1-2-2}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "1-2-2".
[RD-]=> :goal{2}
[RD-] discharged:
eq iinvCheck-ex = true
[RD-] discharged goal "2".
[a$sw]=> :goal{2}
[RD-]=> :goal{2}
[a$sr]=> :goal{2}
[RD-]=> :goal{2}
(consumed 0.2140 sec, including 4006 rewrites + 33065 matches)
** All goals are successfully discharged.
**> QED *** IINVcheck-wc-ex
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> module for lemmas about invariants
--> ----------------------------------------------------------------
-- defining module! INV-lm
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./qlock-wc-daq-lm.cafe
--> ****************************************************************
--> 5.10.1 補題モジュール DAQ-lm
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-wc-dms-prp.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./pnat.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
--> PNAT with _+_ and _*_
--> ----------------------------------------------------------------
-- defining module! PNAT
-- defining module! PNAT=
-- defining module! PNAT+ac
-- defining module! PNAT*ac
--> ----------------------------------------------------------------
--> 大小述語_>_が定義されたPNAT
--> ----------------------------------------------------------------
-- defining module! PNAT*ac>
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 基本到達特性wcの証明のための自然数値の減少関数#dms
--> ----------------------------------------------------------------
-- defining module* DMS
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ================================================================
--> モジュールDMSで,等式
--> cq #daq((Q:Aq | A1:Aid),A2:Aid) = #daq(Q,A2)
--> if not(A1 =a A2) and (A2 in (q->s Q)) .
--> が成り立つことを,
--> Q:Aqに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> proof module (module for the proof)
--> ----------------------------------------------------------------
-- defining module DAQqa1a2
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- opening module DAQqa1a2(X.STATE)
-- reduce in %DAQqa1a2(X.STATE) : (#daq-qa1a2(nilQ,a1,a2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0001 sec for 35 rewrites + 104 matches)
**> QED *** DAQqa1a2 * base
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- opening module DAQqa1a2(X.STATE)
** Beginning a new proof in %
:goal { ** root -----------------------------------------
-- context module: %
-- sentence to be proved
eq #daq-qa1a2((a | q),a1,a2) = true .
}
** Initial goal (root) is generated. **
a1=a2 defined as :csp{eq a1 = a2 . eq (a1 =a a2) = false . }
a=a2 defined as :csp{eq a = a2 . eq (a =a a2) = false . }
a2!q defined as :csp{eq (a2 in (q->s q)) = true . eq (a2 in (q->s q)) = false . }
[a1=a2]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq #daq-qa1a2((a | q),a1,a2) = true
[RD-] discharged goal "1".
[a=a2]=> :goal{1}
[RD-]=> :goal{1}
[a2!q]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
[a=a2]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[RD-] discharged:
eq #daq-qa1a2((a | q),a1,a2) = true
[RD-] discharged goal "2-1".
[a2!q]=> :goal{2-1}
[RD-]=> :goal{2-1}
[RD-]=> :goal{2-2}
[a2!q]=> :goal{2-2}
** Generated 2 goals
[RD-]=> :goal{2-2-1}
[RD-] discharged:
eq #daq-qa1a2((a | q),a1,a2) = true
[RD-] discharged goal "2-2-1".
[RD-]=> :goal{2-2-2}
[RD-] discharged:
eq #daq-qa1a2((a | q),a1,a2) = true
[RD-] discharged goal "2-2-2".
(consumed 0.0096 sec, including 264 rewrites + 3445 matches)
** All goals are successfully discharged.
**> QED *** DAQqa1a2 * step
--> ================================================================
--> ----------------------------------------------------------------
--> module of lemma about #daq
--> ----------------------------------------------------------------
-- defining module! DAQ-lm
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ****************************************************************
--> Verification conditions wc1 for wc property
--> (for-all One-Step-Transition (S->S'):State->State
--> ((inv(S) and (A inw S) and not(S inc S))
--> implies
--> (((A inw SS) or (A inc SS)) and
--> (#dms(S,A) > #dms(SS,A)))))
--> ****************************************************************
--> ----------------------------------------------------------------
--> CNRwc1 -- module for defining cnr for wc condition wc1
--> ----------------------------------------------------------------
-- defining module CNRwc1
--> ----------------------------------------------------------------
--> WC1check -- module for checking condition (1) + (2)
--> ----------------------------------------------------------------
-- defining module WC1check
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> ----------------------------------------------------------------
--> WC1check-wt: module for checking wc1 on WTtr
--> ----------------------------------------------------------------
-- defining module WC1check-wt
--> ================================================================
--> check (1Check-wt = true)
--> ----------------------------------------------------------------
** Beginning a new proof in WC1check-wt
:goal { ** root -----------------------------------------
-- context module: WC1check-wt
-- sentence to be proved
eq wc1check-wt = true .
}
** Initial goal (root) is generated. **
sc=em defined as :csp{eq sc = empS . eq sc = (ac1 | sc1) . }
aa@sw defined as :csp{eq sw = (aa sw1) . eq (aa in sw) = false . }
ar=aa defined as :csp{eq ar = aa . eq (ar =a aa) = false . }
aa!q defined as :csp{eq (aa in (q->s q)) = true . eq (aa in (q->s q)) = false . }
[sc=em]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (ar sw) c empS ]), Sr:As
|-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> empS, Sw:As |-> sw }
--> (((### not determined ### ; ([ q r (ar sr) w sw c empS ]) => ([ (q
| ar) r sr w (ar sw) c empS ])) % true) % (((aa in sw) and inv(([ q r (ar sr)
w sw c empS ]))) xor (true xor (inv(([ q r (ar sr) w sw c empS ])) and (((
s ((# sr) + (#daq(q,aa) + (#daq(q,aa) + #daq(q,aa))))) > ((# sr) + (#daq((q
| ar),aa) + (#daq((q | ar),aa) + #daq((q | ar),aa))))) and (aa in sw)))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (ar sw) c empS ]), Sr:As
|-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> empS, Sw:As |-> sw }
--> (((### not determined ### ; ([ q r (ar sr) w sw c empS ]) => ([ (q
| ar) r sr w (ar sw) c empS ])) % true) % (((aa in sw) and inv(([ q r (ar sr)
w sw c empS ]))) xor (true xor (inv(([ q r (ar sr) w sw c empS ])) and (((
s ((# sr) + (#daq(q,aa) + (#daq(q,aa) + #daq(q,aa))))) > ((# sr) + (#daq((q
| ar),aa) + (#daq((q | ar),aa) + #daq((q | ar),aa))))) and (aa in sw)))))):Info
[aa@sw]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (aa (ar sw1)) c empS
]), Sr:As |-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> empS, Sw:As |-> (aa sw1) }
--> (((### not determined ### ; ([ q r (ar sr) w (aa sw1) c empS ]) => (
[ (q | ar) r sr w (ar (aa sw1)) c empS ])) % true) % (inv(([ q r (ar sr)
w (aa sw1) c empS ])) xor (true xor (((s ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ #daq(q,aa))))) > ((# sr) + (#daq((q | ar),aa) + (#daq((q | ar),aa) + #daq((q
| ar),aa))))) and inv(([ q r (ar sr) w (aa sw1) c empS ])))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (aa (ar sw1)) c empS
]), Sr:As |-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> empS, Sw:As |-> (aa sw1) }
--> (((### not determined ### ; ([ q r (ar sr) w (aa sw1) c empS ]) => (
[ (q | ar) r sr w (ar (aa sw1)) c empS ])) % true) % (inv(([ q r (ar sr)
w (aa sw1) c empS ])) xor (true xor (((s ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ #daq(q,aa))))) > ((# sr) + (#daq((q | ar),aa) + (#daq((q | ar),aa) + #daq((q
| ar),aa))))) and inv(([ q r (ar sr) w (aa sw1) c empS ])))))):Info
[ar=aa]=> :goal{1-1}
** Generated 2 goals
[RD-]=> :goal{1-1-1}
[RD-] discharged:
eq wc1check-wt = true
[RD-] discharged goal "1-1-1".
[aa!q]=> :goal{1-1-1}
[RD-]=> :goal{1-1-1}
[RD-]=> :goal{1-1-2}
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (aa (ar sw1)) c empS
]), Sr:As |-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> empS, Sw:As |-> (aa sw1) }
--> (((### not determined ### ; ([ q r (ar sr) w (aa sw1) c empS ]) => (
[ (q | ar) r sr w (ar (aa sw1)) c empS ])) % true) % (inv(([ q r (ar sr)
w (aa sw1) c empS ])) xor (true xor (((s ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ #daq(q,aa))))) > ((# sr) + (#daq((q | ar),aa) + (#daq((q | ar),aa) + #daq((q
| ar),aa))))) and inv(([ q r (ar sr) w (aa sw1) c empS ])))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (q | ar) r sr w (aa (ar sw1)) c empS
]), Sr:As |-> sr, Ar:Aid |-> ar, Q:Aq |-> q, Sc:As |-> empS, Sw:As |-> (aa sw1) }
--> (((### not determined ### ; ([ q r (ar sr) w (aa sw1) c empS ]) => (
[ (q | ar) r sr w (ar (aa sw1)) c empS ])) % true) % (inv(([ q r (ar sr)
w (aa sw1) c empS ])) xor (true xor (((s ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ #daq(q,aa))))) > ((# sr) + (#daq((q | ar),aa) + (#daq((q | ar),aa) + #daq((q
| ar),aa))))) and inv(([ q r (ar sr) w (aa sw1) c empS ])))))):Info
[aa!q]=> :goal{1-1-2}
** Generated 2 goals
[RD-]=> :goal{1-1-2-1}
[RD-] discharged:
eq wc1check-wt = true
[RD-] discharged goal "1-1-2-1".
[RD-]=> :goal{1-1-2-2}
[RD-] discharged:
eq wc1check-wt = true
[RD-] discharged goal "1-1-2-2".
[RD-]=> :goal{1-2}
[RD-] discharged:
eq wc1check-wt = true
[RD-] discharged goal "1-2".
[ar=aa]=> :goal{1-2}
[RD-]=> :goal{1-2}
[aa!q]=> :goal{1-2}
[RD-]=> :goal{1-2}
[RD-]=> :goal{2}
[RD-] discharged:
eq wc1check-wt = true
[RD-] discharged goal "2".
[aa@sw]=> :goal{2}
[RD-]=> :goal{2}
[ar=aa]=> :goal{2}
[RD-]=> :goal{2}
[aa!q]=> :goal{2}
[RD-]=> :goal{2}
(consumed 0.1444 sec, including 15617 rewrites + 153860 matches)
** All goals are successfully discharged.
**> QED *** WC1check-wt
--> ****************************************************************
--> 練習問題5.3 [到達帰納条件ty] 解答例開始
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> ----------------------------------------------------------------
--> WC1check-ty -- module for checking wc1 on TYtr
--> ----------------------------------------------------------------
-- defining module WC1check-ty
--> ================================================================
--> check (wc1check-ty = true)
--> ----------------------------------------------------------------
** Beginning a new proof in WC1check-ty
:goal { ** root -----------------------------------------
-- context module: WC1check-ty
-- sentence to be proved
eq wc1check-ty = true .
}
** Initial goal (root) is generated. **
sc=em defined as :csp{eq sc = empS . eq sc = (ac1 sc1) . }
sc1=e defined as :csp{eq sc1 = empS . eq sc1 = (ac2 sc2) . }
a=ac1 defined as :csp{eq a = ac1 . eq (a =a ac1) = false . }
[sc=em]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq wc1check-ty = true
[RD-] discharged goal "1".
[sc1=e]=> :goal{1}
[RD-]=> :goal{1}
[a=ac1]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (ac1 (a sc1)) ]),
Sw:As |-> sw, A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (ac1 sc1) }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c (ac1 sc1) ])
=> ([ (a | q) r sr w sw c (a (ac1 sc1)) ])) % true) % (((aa in sc1) and (inv((
[ (a | q) r sr w (a sw) c (ac1 sc1) ])) and ((aa in sw) and (aa =a ac1))))
xor (((aa in sc1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa
in sw))) xor (((aa =a ac1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1)
])) and (aa in sw))) xor (((aa in sc1) and (inv(([ (a | q) r sr w (a sw)
c (ac1 sc1) ])) and ((aa =a ac1) and (aa =a a)))) xor (((aa =a a) and (inv((
[ (a | q) r sr w (a sw) c (ac1 sc1) ])) and ((aa in sw) and (aa =a ac1))))
xor (((aa in sc1) and ((aa =a ac1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1)
])) and ((aa in sw) and (aa =a a))))) xor (true xor ((inv(([ (a | q) r sr
w (a sw) c (ac1 sc1) ])) and (aa in sw)) xor (((aa =a a) and (inv(([ (a | q)
r sr w (a sw) c (ac1 sc1) ])) and ((aa in sc1) and (aa in sw)))) xor ((inv((
[ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa =a a)) xor (((aa in sw)
and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa =a a))) xor (((aa
=a ac1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa =a a)))
xor ((aa in sc1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa
=a a)))))))))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (ac1 (a sc1)) ]),
Sw:As |-> sw, A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> (ac1 sc1) }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c (ac1 sc1) ])
=> ([ (a | q) r sr w sw c (a (ac1 sc1)) ])) % true) % (((aa in sc1) and (inv((
[ (a | q) r sr w (a sw) c (ac1 sc1) ])) and ((aa in sw) and (aa =a ac1))))
xor (((aa in sc1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa
in sw))) xor (((aa =a ac1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1)
])) and (aa in sw))) xor (((aa in sc1) and (inv(([ (a | q) r sr w (a sw)
c (ac1 sc1) ])) and ((aa =a ac1) and (aa =a a)))) xor (((aa =a a) and (inv((
[ (a | q) r sr w (a sw) c (ac1 sc1) ])) and ((aa in sw) and (aa =a ac1))))
xor (((aa in sc1) and ((aa =a ac1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1)
])) and ((aa in sw) and (aa =a a))))) xor (true xor ((inv(([ (a | q) r sr
w (a sw) c (ac1 sc1) ])) and (aa in sw)) xor (((aa =a a) and (inv(([ (a | q)
r sr w (a sw) c (ac1 sc1) ])) and ((aa in sc1) and (aa in sw)))) xor ((inv((
[ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa =a a)) xor (((aa in sw)
and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa =a a))) xor (((aa
=a ac1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa =a a)))
xor ((aa in sc1) and (inv(([ (a | q) r sr w (a sw) c (ac1 sc1) ])) and (aa
=a a)))))))))))))))):Info
[sc1=e]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (ac1 a) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1 }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c ac1 ]) => ([ (a
| q) r sr w sw c (a ac1) ])) % true) % ((inv(([ (a | q) r sr w (a sw) c ac1
])) and (aa in sw)) xor (((aa =a a) and (inv(([ (a | q) r sr w (a sw) c ac1
])) and ((aa =a ac1) and (aa in sw)))) xor ((inv(([ (a | q) r sr w (a sw)
c ac1 ])) and (aa =a a)) xor (true xor (((aa in sw) and (inv(([ (a | q) r sr
w (a sw) c ac1 ])) and (aa =a ac1))) xor (((aa in sw) and (inv(([ (a | q)
r sr w (a sw) c ac1 ])) and (aa =a a))) xor ((aa =a ac1) and (inv(([ (a | q)
r sr w (a sw) c ac1 ])) and (aa =a a)))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ (a | q) r sr w sw c (ac1 a) ]), Sw:As |-> sw,
A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1 }
--> (((### not determined ### ; ([ (a | q) r sr w (a sw) c ac1 ]) => ([ (a
| q) r sr w sw c (a ac1) ])) % true) % ((inv(([ (a | q) r sr w (a sw) c ac1
])) and (aa in sw)) xor (((aa =a a) and (inv(([ (a | q) r sr w (a sw) c ac1
])) and ((aa =a ac1) and (aa in sw)))) xor ((inv(([ (a | q) r sr w (a sw)
c ac1 ])) and (aa =a a)) xor (true xor (((aa in sw) and (inv(([ (a | q) r sr
w (a sw) c ac1 ])) and (aa =a ac1))) xor (((aa in sw) and (inv(([ (a | q)
r sr w (a sw) c ac1 ])) and (aa =a a))) xor ((aa =a ac1) and (inv(([ (a | q)
r sr w (a sw) c ac1 ])) and (aa =a a)))))))))):Info
[a=ac1]=> :goal{2-1}
** Generated 2 goals
[RD-]=> :goal{2-1-1}
[RD-] discharged:
eq wc1check-ty = true
[RD-] discharged goal "2-1-1".
[RD-]=> :goal{2-1-2}
[RD-] discharged:
eq wc1check-ty = true
[RD-] discharged goal "2-1-2".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq wc1check-ty = true
[RD-] discharged goal "2-2".
[a=ac1]=> :goal{2-2}
[RD-]=> :goal{2-2}
(consumed 0.7241 sec, including 68209 rewrites + 1178332 matches)
** All goals are successfully discharged.
**> QED *** WC1check-ty
--> ****************************************************************
--> 練習問題5.3 解答例終了
--> ****************************************************************
--> ****************************************************************
--> 練習問題5.4 [到達帰納条件ex] 解答例開始
--> ****************************************************************
--> ****************************************************************
--> ****************************************************************
--> ----------------------------------------------------------------
--> WC1check-ex: module for checking wc1 on EXtr
--> ----------------------------------------------------------------
-- defining module WC1check-ex
--> ================================================================
--> check (wc1check-ex = true)
--> ----------------------------------------------------------------
** Beginning a new proof in WC1check-ex
:goal { ** root -----------------------------------------
-- context module: WC1check-ex
-- sentence to be proved
eq wc1check-ex = true .
}
** Initial goal (root) is generated. **
sc=em defined as :csp{eq sc = empS . eq sc = (ac1 sc1) . }
sc1=e defined as :csp{eq sc1 = empS . eq sc1 = (ac2 sc2) . }
a=ac1 defined as :csp{eq a = ac1 . eq (a =a ac1) = false . }
aa=ac1 defined as :csp{eq aa = ac1 . eq (aa =a ac1) = false . }
aa!q defined as :csp{eq (aa in (q->s q)) = true . eq (aa in (q->s q)) = false . }
aa@sw defined as :csp{eq sw = (aa sw1) . eq (aa in sw) = false . }
[sc=em]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq wc1check-ex = true
[RD-] discharged goal "1".
[sc1=e]=> :goal{1}
[RD-]=> :goal{1}
[a=ac1]=> :goal{1}
[RD-]=> :goal{1}
[aa=ac1]=> :goal{1}
[RD-]=> :goal{1}
[aa!q]=> :goal{1}
[RD-]=> :goal{1}
[aa@sw]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
{ CC:Bool |-> ((a in sc1) xor ((a =a ac1) xor ((a =a ac1) and (a in sc1)))),
SS:State |-> ([ q r (a sr) w sw c ((ac1 sc1) -as a) ]), A:Aid |-> a, Q:Aq |-> q,
Sr:As |-> sr, Sc:As |-> (ac1 sc1), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (ac1 sc1) ]) => (
[ q r (a sr) w sw c ((ac1 sc1) -as a) ])) % ((a in sc1) xor ((a =a ac1)
xor ((a =a ac1) and (a in sc1))))) % (((aa =a ac1) and ((aa in sc1) and ((aa
in sw) and inv(([ (a | q) r sr w sw c (ac1 sc1) ]))))) xor (((aa =a ac1)
and ((aa in sw) and inv(([ (a | q) r sr w sw c (ac1 sc1) ])))) xor (((aa
in sw) and inv(([ (a | q) r sr w sw c (ac1 sc1) ]))) xor (((aa in sc1)
and ((aa in sw) and inv(([ (a | q) r sr w sw c (ac1 sc1) ])))) xor (true
xor (((aa in sc1) and ((aa =a ac1) and ((aa in sw) and (inv(([ (a | q) r sr
w sw c (ac1 sc1) ])) and ((#daq((a | q),aa) + (#daq((a | q),aa) + (#daq((a
| q),aa) + (# sr)))) > (s (#daq(q,aa) + (#daq(q,aa) + (#daq(q,aa) + ((if ((
# ((ac1 sc1) -as a)) = 0) then (s 0) else 0 fi) + (# sr))))))))))) xor ((inv((
[ (a | q) r sr w sw c (ac1 sc1) ])) and ((aa in sw) and ((#daq((a | q),aa)
+ (#daq((a | q),aa) + (#daq((a | q),aa) + (# sr)))) > (s (#daq(q,aa) + (#daq(q,aa)
+ (#daq(q,aa) + ((if ((# ((ac1 sc1) -as a)) = 0) then (s 0) else 0 fi) + (
# sr))))))))) xor (((aa =a ac1) and ((aa in sw) and (inv(([ (a | q) r sr
w sw c (ac1 sc1) ])) and ((#daq((a | q),aa) + ((# sr) + (#daq((a | q),aa)
+ #daq((a | q),aa)))) > (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ (if ((# ((ac1 sc1) -as a)) = 0) then (s 0) else 0 fi)))))))))) xor (inv((
[ (a | q) r sr w sw c (ac1 sc1) ])) and ((aa in sw) and ((aa in sc1) and (((
# sr) + (#daq((a | q),aa) + (#daq((a | q),aa) + #daq((a | q),aa)))) > (s ((
# sr) + (#daq(q,aa) + ((if ((# ((ac1 sc1) -as a)) = 0) then (s 0) else 0
fi) + (#daq(q,aa) + #daq(q,aa))))))))))))))))))):Info
{ CC:Bool |-> ((a in sc1) xor ((a =a ac1) xor ((a =a ac1) and (a in sc1)))),
SS:State |-> ([ q r (a sr) w sw c ((ac1 sc1) -as a) ]), A:Aid |-> a, Q:Aq |-> q,
Sr:As |-> sr, Sc:As |-> (ac1 sc1), Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c (ac1 sc1) ]) => (
[ q r (a sr) w sw c ((ac1 sc1) -as a) ])) % ((a in sc1) xor ((a =a ac1)
xor ((a =a ac1) and (a in sc1))))) % (((aa =a ac1) and ((aa in sc1) and ((aa
in sw) and inv(([ (a | q) r sr w sw c (ac1 sc1) ]))))) xor (((aa =a ac1)
and ((aa in sw) and inv(([ (a | q) r sr w sw c (ac1 sc1) ])))) xor (((aa
in sw) and inv(([ (a | q) r sr w sw c (ac1 sc1) ]))) xor (((aa in sc1)
and ((aa in sw) and inv(([ (a | q) r sr w sw c (ac1 sc1) ])))) xor (true
xor (((aa in sc1) and ((aa =a ac1) and ((aa in sw) and (inv(([ (a | q) r sr
w sw c (ac1 sc1) ])) and ((#daq((a | q),aa) + (#daq((a | q),aa) + (#daq((a
| q),aa) + (# sr)))) > (s (#daq(q,aa) + (#daq(q,aa) + (#daq(q,aa) + ((if ((
# ((ac1 sc1) -as a)) = 0) then (s 0) else 0 fi) + (# sr))))))))))) xor ((inv((
[ (a | q) r sr w sw c (ac1 sc1) ])) and ((aa in sw) and ((#daq((a | q),aa)
+ (#daq((a | q),aa) + (#daq((a | q),aa) + (# sr)))) > (s (#daq(q,aa) + (#daq(q,aa)
+ (#daq(q,aa) + ((if ((# ((ac1 sc1) -as a)) = 0) then (s 0) else 0 fi) + (
# sr))))))))) xor (((aa =a ac1) and ((aa in sw) and (inv(([ (a | q) r sr
w sw c (ac1 sc1) ])) and ((#daq((a | q),aa) + ((# sr) + (#daq((a | q),aa)
+ #daq((a | q),aa)))) > (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ (if ((# ((ac1 sc1) -as a)) = 0) then (s 0) else 0 fi)))))))))) xor (inv((
[ (a | q) r sr w sw c (ac1 sc1) ])) and ((aa in sw) and ((aa in sc1) and (((
# sr) + (#daq((a | q),aa) + (#daq((a | q),aa) + #daq((a | q),aa)))) > (s ((
# sr) + (#daq(q,aa) + ((if ((# ((ac1 sc1) -as a)) = 0) then (s 0) else 0
fi) + (#daq(q,aa) + #daq(q,aa))))))))))))))))))):Info
[sc1=e]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
{ CC:Bool |-> (a =a ac1), SS:State |-> ([ q r (a sr) w sw c (ac1 -as a)
]), A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c ac1 ]) => ([ q r (a sr)
w sw c (ac1 -as a) ])) % (a =a ac1)) % (((aa in sw) and inv(([ (a | q) r sr
w sw c ac1 ]))) xor (((aa =a ac1) and ((aa in sw) and inv(([ (a | q) r sr
w sw c ac1 ])))) xor (true xor ((inv(([ (a | q) r sr w sw c ac1 ])) and ((aa
in sw) and ((#daq((a | q),aa) + ((# sr) + (#daq((a | q),aa) + #daq((a | q),aa))))
> (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + (#daq(q,aa) + (if ((# (ac1 -as a))
= 0) then (s 0) else 0 fi))))))))) xor ((aa =a ac1) and ((aa in sw) and (inv((
[ (a | q) r sr w sw c ac1 ])) and ((#daq((a | q),aa) + ((# sr) + (#daq((a
| q),aa) + #daq((a | q),aa)))) > (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ (if ((# (ac1 -as a)) = 0) then (s 0) else 0 fi))))))))))))))):Info
{ CC:Bool |-> (a =a ac1), SS:State |-> ([ q r (a sr) w sw c (ac1 -as a)
]), A:Aid |-> a, Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (a | q) r sr w sw c ac1 ]) => ([ q r (a sr)
w sw c (ac1 -as a) ])) % (a =a ac1)) % (((aa in sw) and inv(([ (a | q) r sr
w sw c ac1 ]))) xor (((aa =a ac1) and ((aa in sw) and inv(([ (a | q) r sr
w sw c ac1 ])))) xor (true xor ((inv(([ (a | q) r sr w sw c ac1 ])) and ((aa
in sw) and ((#daq((a | q),aa) + ((# sr) + (#daq((a | q),aa) + #daq((a | q),aa))))
> (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + (#daq(q,aa) + (if ((# (ac1 -as a))
= 0) then (s 0) else 0 fi))))))))) xor ((aa =a ac1) and ((aa in sw) and (inv((
[ (a | q) r sr w sw c ac1 ])) and ((#daq((a | q),aa) + ((# sr) + (#daq((a
| q),aa) + #daq((a | q),aa)))) > (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ (if ((# (ac1 -as a)) = 0) then (s 0) else 0 fi))))))))))))))):Info
[a=ac1]=> :goal{2-1}
** Generated 2 goals
[RD-]=> :goal{2-1-1}
{ CC:Bool |-> true, SS:State |-> ([ q r (ac1 sr) w sw c empS ]), A:Aid |-> ac1,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (ac1 | q) r sr w sw c ac1 ]) => ([ q
r (ac1 sr) w sw c empS ])) % true) % (((aa in sw) and inv(([ (ac1 | q) r sr
w sw c ac1 ]))) xor (((aa =a ac1) and ((aa in sw) and inv(([ (ac1 | q) r sr
w sw c ac1 ])))) xor (true xor (((aa in sw) and (((#daq((ac1 | q),aa) + ((
# sr) + (#daq((ac1 | q),aa) + #daq((ac1 | q),aa)))) > (s (s ((# sr) + (#daq(q,aa)
+ (#daq(q,aa) + #daq(q,aa))))))) and ((aa =a ac1) and inv(([ (ac1 | q) r sr
w sw c ac1 ]))))) xor ((aa in sw) and (((#daq((ac1 | q),aa) + ((# sr) + (#daq((ac1
| q),aa) + #daq((ac1 | q),aa)))) > (s (s ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ #daq(q,aa))))))) and inv(([ (ac1 | q) r sr w sw c ac1 ]))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ q r (ac1 sr) w sw c empS ]), A:Aid |-> ac1,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (ac1 | q) r sr w sw c ac1 ]) => ([ q
r (ac1 sr) w sw c empS ])) % true) % (((aa in sw) and inv(([ (ac1 | q) r sr
w sw c ac1 ]))) xor (((aa =a ac1) and ((aa in sw) and inv(([ (ac1 | q) r sr
w sw c ac1 ])))) xor (true xor (((aa in sw) and (((#daq((ac1 | q),aa) + ((
# sr) + (#daq((ac1 | q),aa) + #daq((ac1 | q),aa)))) > (s (s ((# sr) + (#daq(q,aa)
+ (#daq(q,aa) + #daq(q,aa))))))) and ((aa =a ac1) and inv(([ (ac1 | q) r sr
w sw c ac1 ]))))) xor ((aa in sw) and (((#daq((ac1 | q),aa) + ((# sr) + (#daq((ac1
| q),aa) + #daq((ac1 | q),aa)))) > (s (s ((# sr) + (#daq(q,aa) + (#daq(q,aa)
+ #daq(q,aa))))))) and inv(([ (ac1 | q) r sr w sw c ac1 ]))))))))):Info
[aa=ac1]=> :goal{2-1-1}
** Generated 2 goals
[RD-]=> :goal{2-1-1-1}
[RD-] discharged:
eq wc1check-ex = true
[RD-] discharged goal "2-1-1-1".
[aa!q]=> :goal{2-1-1-1}
[RD-]=> :goal{2-1-1-1}
[aa@sw]=> :goal{2-1-1-1}
[RD-]=> :goal{2-1-1-1}
[RD-]=> :goal{2-1-1-2}
{ CC:Bool |-> true, SS:State |-> ([ q r (ac1 sr) w sw c empS ]), A:Aid |-> ac1,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (ac1 | q) r sr w sw c ac1 ]) => ([ q
r (ac1 sr) w sw c empS ])) % true) % (((aa in sw) and inv(([ (ac1 | q) r sr
w sw c ac1 ]))) xor (true xor ((aa in sw) and (inv(([ (ac1 | q) r sr w sw
c ac1 ])) and ((#daq((ac1 | q),aa) + (#daq((ac1 | q),aa) + (#daq((ac1 | q),aa)
+ (# sr)))) > (s (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + #daq(q,aa)))))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ q r (ac1 sr) w sw c empS ]), A:Aid |-> ac1,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (ac1 | q) r sr w sw c ac1 ]) => ([ q
r (ac1 sr) w sw c empS ])) % true) % (((aa in sw) and inv(([ (ac1 | q) r sr
w sw c ac1 ]))) xor (true xor ((aa in sw) and (inv(([ (ac1 | q) r sr w sw
c ac1 ])) and ((#daq((ac1 | q),aa) + (#daq((ac1 | q),aa) + (#daq((ac1 | q),aa)
+ (# sr)))) > (s (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + #daq(q,aa)))))))))))):Info
[aa!q]=> :goal{2-1-1-2}
** Generated 2 goals
[RD-]=> :goal{2-1-1-2-1}
[RD-] discharged:
eq wc1check-ex = true
[RD-] discharged goal "2-1-1-2-1".
[aa@sw]=> :goal{2-1-1-2-1}
[RD-]=> :goal{2-1-1-2-1}
[RD-]=> :goal{2-1-1-2-2}
{ CC:Bool |-> true, SS:State |-> ([ q r (ac1 sr) w sw c empS ]), A:Aid |-> ac1,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (ac1 | q) r sr w sw c ac1 ]) => ([ q
r (ac1 sr) w sw c empS ])) % true) % (((aa in sw) and inv(([ (ac1 | q) r sr
w sw c ac1 ]))) xor (true xor ((aa in sw) and (inv(([ (ac1 | q) r sr w sw
c ac1 ])) and ((#daq((ac1 | q),aa) + (#daq((ac1 | q),aa) + (#daq((ac1 | q),aa)
+ (# sr)))) > (s (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + #daq(q,aa)))))))))))):Info
{ CC:Bool |-> true, SS:State |-> ([ q r (ac1 sr) w sw c empS ]), A:Aid |-> ac1,
Q:Aq |-> q, Sr:As |-> sr, Sc:As |-> ac1, Sw:As |-> sw }
--> (((### not determined ### ; ([ (ac1 | q) r sr w sw c ac1 ]) => ([ q
r (ac1 sr) w sw c empS ])) % true) % (((aa in sw) and inv(([ (ac1 | q) r sr
w sw c ac1 ]))) xor (true xor ((aa in sw) and (inv(([ (ac1 | q) r sr w sw
c ac1 ])) and ((#daq((ac1 | q),aa) + (#daq((ac1 | q),aa) + (#daq((ac1 | q),aa)
+ (# sr)))) > (s (s (#daq(q,aa) + ((# sr) + (#daq(q,aa) + #daq(q,aa)))))))))))):Info
[aa@sw]=> :goal{2-1-1-2-2}
** Generated 2 goals
[RD-]=> :goal{2-1-1-2-2-1}
[RD-] discharged:
eq wc1check-ex = true
[RD-] discharged goal "2-1-1-2-2-1".
[RD-]=> :goal{2-1-1-2-2-2}
[RD-] discharged:
eq wc1check-ex = true
[RD-] discharged goal "2-1-1-2-2-2".
[RD-]=> :goal{2-1-2}
[RD-] discharged:
eq wc1check-ex = true
[RD-] discharged goal "2-1-2".
[aa=ac1]=> :goal{2-1-2}
[RD-]=> :goal{2-1-2}
[aa!q]=> :goal{2-1-2}
[RD-]=> :goal{2-1-2}
[aa@sw]=> :goal{2-1-2}
[RD-]=> :goal{2-1-2}
[RD-]=> :goal{2-2}
[RD-] discharged:
eq wc1check-ex = true
[RD-] discharged goal "2-2".
[a=ac1]=> :goal{2-2}
[RD-]=> :goal{2-2}
[aa=ac1]=> :goal{2-2}
[RD-]=> :goal{2-2}
[aa!q]=> :goal{2-2}
[RD-]=> :goal{2-2}
[aa@sw]=> :goal{2-2}
[RD-]=> :goal{2-2}
(consumed 4.1871 sec, including 182732 rewrites + 6478726 matches)
** All goals are successfully discharged.
**> QED ** WC1check-ex
--> ****************************************************************
--> 練習問題5.4 解答例終了
--> ****************************************************************
--> ****************************************************************
--> Verification conditions wc2 for wc property
--> (for-all state s:State and data d:Data):
--> (inv(s) and p(s,d) and not(q(s,d)))
--> implies
--> (there-exits transition (s->s'):(State,State))
--> ****************************************************************
--> ----------------------------------------------------------------
--> CHECKwc2 -- module for defining check-wc2 for the condition wc2
--> ----------------------------------------------------------------
-- defining module CHECKwc2
--> ----------------------------------------------------------------
--> WCcheck2 -- module for checking condition wc2
--> ----------------------------------------------------------------
-- defining module WC2check
--> ================================================================
--> check (wc2Check = true)
--> ----------------------------------------------------------------
** Beginning a new proof in WC2check
:goal { ** root -----------------------------------------
-- context module: WC2check
-- sentence to be proved
eq wc2check = true .
}
** Initial goal (root) is generated. **
sr=em defined as :csp{eq sr = empS . eq sr = (ar1 sr1) . }
q=nil defined as :csp{eq q = nilQ . eq q = (a1 | q1) . }
a1@sw defined as :csp{eq sw = (a1 sw-a1) . eq (a1 in sw) = false . }
a1@sc defined as :csp{eq sc = (a1 sc-a1) . eq (a1 in sc) = false . }
[sr=em]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[q=nil]=> :goal{1}
** Generated 2 goals
[RD-]=> :goal{1-1}
[RD-] discharged:
eq wc2check = true
[RD-] discharged goal "1-1".
[a1@sw]=> :goal{1-1}
[RD-]=> :goal{1-1}
[a1@sc]=> :goal{1-1}
[RD-]=> :goal{1-1}
[RD-]=> :goal{1-2}
[a1@sw]=> :goal{1-2}
** Generated 2 goals
[RD-]=> :goal{1-2-1}
[RD-] discharged:
eq wc2check = true
[RD-] discharged goal "1-2-1".
[a1@sc]=> :goal{1-2-1}
[RD-]=> :goal{1-2-1}
[RD-]=> :goal{1-2-2}
[a1@sc]=> :goal{1-2-2}
** Generated 2 goals
[RD-]=> :goal{1-2-2-1}
[RD-] discharged:
eq wc2check = true
[RD-] discharged goal "1-2-2-1".
[RD-]=> :goal{1-2-2-2}
[RD-] discharged:
eq wc2check = true
[RD-] discharged goal "1-2-2-2".
[RD-]=> :goal{2}
[RD-] discharged:
eq wc2check = true
[RD-] discharged goal "2".
[q=nil]=> :goal{2}
[RD-]=> :goal{2}
[a1@sw]=> :goal{2}
[RD-]=> :goal{2}
[a1@sc]=> :goal{2}
[RD-]=> :goal{2}
(consumed 0.1072 sec, including 11589 rewrites + 113195 matches)
** All goals are successfully discharged.
**> QED *** WC2check
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
WC2check(X.STATE)> [Leaving CafeOBJ]
========================================
Running: qlock-wc-qtos.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:27 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/qlock-wc-qtos.cafe
--> ****************************************************************
--> 5.10 帰納到達条件の証明スコア
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> モジュール'Q->S'
--> ----------------------------------------------------------------
-- defining module! Q->S
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
CafeOBJ> [Leaving CafeOBJ]
========================================
Running: qlock-wc-state-lm.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:27 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/qlock-wc-state-lm.cafe
--> ****************************************************************
--> 5.11.1 補題モジュール STATE-lm
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./qlock-state-sys.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
processing input : ./set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 実行主体の名前の集合 (agent identifiers with equality _=a_)
--> ----------------------------------------------------------------
-- defining module* AID=a
--> ----------------------------------------------------------------
--> 実行主体の名前の待ち行列 (Queues of Aid (agent identifiers))
--> ----------------------------------------------------------------
-- defining module* AID-QU
--> ----------------------------------------------------------------
--> 実行主体の名前のSET=s (SET=s of AID=a)
--> ----------------------------------------------------------------
-- defining module* AID-SET
--> ----------------------------------------------------------------
--> QLOCKシステムの状態 (states of QLOCK system)
--> ----------------------------------------------------------------
-- defining module! STATE
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ================================================================
--> モジュールSTATEで,等式
--> cq (A:Aid in (S1:As S2:As)) = (A in S1) or (A in S2)
--> if (not(S1 == empS) and not(S2 == empS)) .
--> が成り立つことを,
--> S:Asに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> module for the proof (proof module)
--> ----------------------------------------------------------------
-- defining module STains1s2
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- defining module STains1s2-base
-- opening module STains1s2-base(X.STATE)
-- reduce in %STains1s2-base(X.STATE) : (ains1s2(a,empS,s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 15 rewrites + 40 matches)
**> QED *** STains1s2 * base * t
-- opening module STains1s2-base(X.STATE)
-- reduce in %STains1s2-base(X.STATE) : (ains1s2(a,empS,s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 15 rewrites + 42 matches)
**> QED *** STains1s2 * base * f
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- defining module STains1s2-step
-- opening module STains1s2-step(X.STATE)
-- reduce in %STains1s2-step(X.STATE) : (ains1s2(a,(a1 s1),s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0004 sec for 41 rewrites + 557 matches)
**> QED *** STains1s2 * step * t
-- opening module STains1s2-step(X.STATE)
-- reduce in %STains1s2-step(X.STATE) : (ains1s2(a,(a1 s1),s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0004 sec for 41 rewrites + 561 matches)
**> QED *** STains1s2 * step * f
--> ================================================================
--> ================================================================
--> モジュールSTATEで,等式
--> eq[s1=<s2]:
--> ((S1:As =< S2:As) and (S1 =< (A:Aid S2))) = (S1 =< S2) .
--> が成り立つことを,
--> S1:Asに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- opening module STATE(X)
-- reduce in %STATE(X) : (((empS =< s2) and (empS =< (a s2))) = (empS =< s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 5 rewrites + 7 matches)
**> QED *** ST * s1=<s2 * base
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- opening module STATE(X)
-- reduce in %STATE(X) : ((((a1 s1) =< s2) and ((a1 s1) =< (a s2))) = ((a1 s1) =< s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0005 sec for 17 rewrites + 647 matches)
**> QED *** ST * s1=<s2 * step
--> ================================================================
--> ================================================================
--> モジュールSTATEで,等式
--> cq (S1:As =< (A:Aid S2:As)) = S1 =< S2 if (not(A in S1)) .
--> が成り立つことを,
--> S1:Asに含まれる要素の数に関する帰納法で証明する証明スコア
--> ================================================================
--> ----------------------------------------------------------------
--> proof module
--> ----------------------------------------------------------------
-- defining module STs1=<as2
--> ================================================================
--> induction base
--> ----------------------------------------------------------------
-- opening module STs1=<as2(X.STATE)
-- reduce in %STs1=<as2(X.STATE) : (s1=<as2(empS,a,s2)):Bool
(true):Bool
(0.0000 sec for parse, 0.0000 sec for 11 rewrites + 17 matches)
**> QED *** STs1=<as2 * base
--> ================================================================
--> induction step
--> ----------------------------------------------------------------
-- opening module STs1=<as2(X.STATE)
** Beginning a new proof in %
-- reading in file : int
-- reading in file : nat
-- reading in file : nznat
-- done reading in file: nznat
-- done reading in file: nat
-- done reading in file: int
:goal { ** root -----------------------------------------
-- context module: %
-- sentence to be proved
eq s1=<as2((a1 s1),a,s2) = true .
}
** Initial goal (root) is generated. **
a=a1 defined as :csp{eq a = a1 . eq (a =a a1) = false . }
a1@s2 defined as :csp{eq s2 = (a1 s21) . eq (a1 in s2) = false . }
a@s1 defined as :csp{eq s1 = (a s11) . eq (a in s1) = false . }
[a=a1]=> :goal{root}
** Generated 2 goals
[RD-]=> :goal{1}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "1".
[a1@s2]=> :goal{1}
[RD-]=> :goal{1}
[a@s1]=> :goal{1}
[RD-]=> :goal{1}
[RD-]=> :goal{2}
[a1@s2]=> :goal{2}
** Generated 2 goals
[RD-]=> :goal{2-1}
[a@s1]=> :goal{2-1}
** Generated 2 goals
[RD-]=> :goal{2-1-1}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "2-1-1".
[RD-]=> :goal{2-1-2}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "2-1-2".
[RD-]=> :goal{2-2}
[RD-] discharged:
eq s1=<as2((a1 s1),a,s2) = true
[RD-] discharged goal "2-2".
[a@s1]=> :goal{2-2}
[RD-]=> :goal{2-2}
(consumed 0.0075 sec, including 239 rewrites + 2414 matches)
** All goals are successfully discharged.
**> QED *** STs1=<as2 * step
--> ================================================================
--> ----------------------------------------------------------------
--> lemmas on STATE
--> ----------------------------------------------------------------
-- defining module! STATE-lm
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
CafeOBJ> [Leaving CafeOBJ]
========================================
Running: seq.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:27 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/seq.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的列 (sequences)
--> ----------------------------------------------------------------
-- defining module! SEQ
--> ----------------------------------------------------------------
--> 等価述語が定義された列 (generic sequences with _=s_)
--> ----------------------------------------------------------------
-- defining module! SEQ=s
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
CafeOBJ> [Leaving CafeOBJ]
========================================
Running: set.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:27 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/set.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
processing input : ./triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> 汎用的な集合 (generic set)
--> ----------------------------------------------------------------
-- defining module! SET
--> ----------------------------------------------------------------
--> 要素述語が定義された汎用的集合 (generic sets with _in_)
--> ----------------------------------------------------------------
-- defining module! SETin
--> ----------------------------------------------------------------
--> 等価述語が定義された汎用的集合 (generic sets with _=s_)
--> ----------------------------------------------------------------
-- defining module! SET=s
--> ----------------------------------------------------------------
--> 共通集合演算_^_が定義された汎用的集合 (generic sets with _^_)
--> ----------------------------------------------------------------
-- defining module! SET=s^
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
CafeOBJ> [Leaving CafeOBJ]
========================================
Running: triv.cafe
========================================
-- loading standard prelude
-- CafeOBJ system Version 1.6.2(PigNose0.99) --
built: 2025 Sep 21 Sun 23:57:24 GMT
prelude file: std.bin
***
2026 Jan 31 Sat 10:16:27 GMT
Type ? for help
***
-- Containing PigNose Extensions --
---
built on SBCL
2.4.11
processing input : /Users/tomoya/Documents/yamato_university/2025_secondSemester/離散数学/cafeobjCodes/triv.cafe
--> ****************************************************************
--> 5.2 QLOCK システムの仕様
--> ****************************************************************
--> ----------------------------------------------------------------
--> 等価述語_=e_が宣言された汎用的なものの集まり
--> ----------------------------------------------------------------
-- defining module* TRIV=e
-- reading in file : bool
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/base_bool.cafe
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/truth.cafe
-- defining module! TRUTH
-- reading in file : truth
-- done reading in file: truth
-- defining module* BASE-BOOL
-- reading in file : eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/eql.cafe
-- defining module! EQL
-- done reading in file: eql
processing input : /opt/homebrew/Cellar/cafeobj/1.6.2/share/cafeobj-1.6/lib/sys_bool.cafe
-- defining module! BOOL
-- done reading in file: bool
--> ----------------------------------------------------------------
--> ----------------------------------------------------------------
--> ****************************************************************
CafeOBJ> [Leaving CafeOBJ]
Uploaded by ともや
2026-01-31 • 0.61 MB