File tree 1 file changed +18
-3
lines changed
1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -39,10 +39,25 @@ elab "testTrans " nHyps:num firstNum:num " by " ts:tacticSeq : command => do
39
39
-- saturate
40
40
-- trivial
41
41
42
+ /--
43
+ #### Transitivity.
42
44
43
- def runTestTrans (nHs : Nat) (fH : Nat) : CommandElabM Nanos := do
44
- let mut nHs := Syntax.mkNatLit nHs
45
- let mut fH := Syntax.mkNatLit fH
45
+ This test compares the efficiency of the procedures on scaled up version of
46
+ a transitivity problem.
47
+
48
+ Given some predicate `P ?x₁ ?x₂`, we register the rule `r : P x y → P y z → P x z`.
49
+ The procedures are then compared on a context containing `nHs` hypotheses
50
+ of the form `(h₁ : P a (n + 1)), ..., (hₙ : P (a + n - 1) (a + n))`.
51
+ Saturating this goal adds a total of `n(n-1)/2` hypotheses to the context.
52
+
53
+ - `nHs` : Number of hypotheses in the context.
54
+ - `a` : Starting integer for the transitivity chain.
55
+ Note that this affects the run time as big number are designed to be much
56
+ harder to unify.
57
+ -/
58
+ def runTestTrans (n : Nat) (a : Nat) : CommandElabM Nanos := do
59
+ let mut nHs := Syntax.mkNatLit n
60
+ let mut fH := Syntax.mkNatLit a
46
61
let cmd := elabCommand <| ← `(testTrans $nHs $fH by
47
62
set_option maxRecDepth 1000000 in
48
63
set_option maxHeartbeats 5000000 in
You can’t perform that action at this time.
0 commit comments