Skip to content

Commit 8e6c9d3

Browse files
authored
Fixed SubSeq axiom for case n < m (#216)
Signed-off-by: rozlynd <[email protected]>
1 parent abef988 commit 8e6c9d3

File tree

1 file changed

+55
-29
lines changed

1 file changed

+55
-29
lines changed

src/encode/n_axioms.ml

Lines changed: 55 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4295,15 +4295,9 @@ let seqsubseq_typing ~disable_arithmetic =
42954295
] %% []
42964296
] ]
42974297
( appb B.Implies
4298-
[ List (And,
4299-
[ apps T.Mem
4300-
[ Ix 3 %% []
4301-
; apps T.SeqSeq
4302-
[ Ix 4 %% []
4303-
] %% []
4304-
] %% []
4305-
] @
4306-
(if disable_arithmetic then
4298+
[ List (Or,
4299+
[ if disable_arithmetic then
4300+
List (And,
43074301
[ apps T.Mem
43084302
[ Ix 2 %% []
43094303
; apps T.IntSet [] %% []
@@ -4312,34 +4306,66 @@ let seqsubseq_typing ~disable_arithmetic =
43124306
[ Ix 1 %% []
43134307
; apps T.IntSet [] %% []
43144308
] %% []
4315-
]
4316-
else []) @
4317-
[ if disable_arithmetic then
4318-
apps T.IntLteq
4319-
[ apps (T.IntLit 1) [] %% []
4320-
; Ix 2 %% []
4321-
] %% []
4309+
; apps T.IntLteq
4310+
[ Ix 1 %% []
4311+
; Ix 2 %% []
4312+
] %% []
4313+
; appb ~tys:[ t_idv ] B.Neq
4314+
[ Ix 1 %% []
4315+
; Ix 2 %% []
4316+
] %% []
4317+
]) %% []
43224318
else
4323-
apps T.TIntLteq
4324-
[ apps (T.TIntLit 1) [] %% []
4319+
apps T.TIntLt
4320+
[ Ix 1 %% []
43254321
; Ix 2 %% []
43264322
] %% []
4327-
; if disable_arithmetic then
4328-
apps T.IntLteq
4329-
[ Ix 1 %% []
4330-
; apps T.SeqLen
4323+
; List (And,
4324+
[ apps T.Mem
43314325
[ Ix 3 %% []
4326+
; apps T.SeqSeq
4327+
[ Ix 4 %% []
4328+
] %% []
43324329
] %% []
4333-
] %% []
4334-
else
4335-
apps T.TIntLteq
4336-
[ Ix 1 %% []
4337-
; apps (T.Proj t_int)
4338-
[ apps T.SeqLen
4330+
] @
4331+
(if disable_arithmetic then
4332+
[ apps T.Mem
4333+
[ Ix 2 %% []
4334+
; apps T.IntSet [] %% []
4335+
] %% []
4336+
; apps T.Mem
4337+
[ Ix 1 %% []
4338+
; apps T.IntSet [] %% []
4339+
] %% []
4340+
]
4341+
else []) @
4342+
[ if disable_arithmetic then
4343+
apps T.IntLteq
4344+
[ apps (T.IntLit 1) [] %% []
4345+
; Ix 2 %% []
4346+
] %% []
4347+
else
4348+
apps T.TIntLteq
4349+
[ apps (T.TIntLit 1) [] %% []
4350+
; Ix 2 %% []
4351+
] %% []
4352+
; if disable_arithmetic then
4353+
apps T.IntLteq
4354+
[ Ix 1 %% []
4355+
; apps T.SeqLen
43394356
[ Ix 3 %% []
43404357
] %% []
43414358
] %% []
4342-
] %% []
4359+
else
4360+
apps T.TIntLteq
4361+
[ Ix 1 %% []
4362+
; apps (T.Proj t_int)
4363+
[ apps T.SeqLen
4364+
[ Ix 3 %% []
4365+
] %% []
4366+
] %% []
4367+
] %% []
4368+
]) %% []
43434369
]) %% []
43444370
; apps T.Mem
43454371
[ apps T.SeqSubSeq

0 commit comments

Comments
 (0)