@@ -123,7 +123,7 @@ where
123123 | Mode.internal => do `(fun $funBinders* => do ' .internal in $l)
124124 | Mode.external => do `(fun $funBinders* => do ' .external in $l)
125125 let genExp <- withDeclName genName do elabTermAndSynthesize genl none
126- let ⟨genExp, _, _⟩ <- genExp. simpWp
126+ let ⟨genExp, _, _⟩ <- simpWp genExp
127127 let genExp <- instantiateMVars <| <- mkLambdaFVarsImplicit vs genExp
128128 simpleAddDefn genName genExp (attr := #[{name := `generatorSimp}, {name := `actSimp}, {name := `reducible}])
129129 return (genName, genExp)
@@ -143,8 +143,8 @@ where
143143 | Mode.internal => baseName
144144 | Mode.external => toExtName baseName
145145 let genExp := Lean.mkConst genName
146- let act ← genExp |>. runUnfold (genName :: wpUnfold)
147- let ⟨act, _actPf, _⟩ <- act. simpAction
146+ let act ← runUnfold genExp (genName :: wpUnfold)
147+ let ⟨act, _actPf, _⟩ <- simpAction act
148148 let mut attr : Array Attribute := #[{name := `initSimp}, {name := `actSimp}]
149149 simpleAddDefn actName act (attr := attr) («type » := ← inferType genExp)
150150 return actName
@@ -183,9 +183,9 @@ where
183183 -- Here, to account for the case when the action is generated from a transition,
184184 -- we also unfold `Function.toWp` and the original definition of the transition.
185185 let origName := toOriginalName baseName
186- let act ← genExp |>. runUnfold (genName :: wpUnfold)
187- let act ← act |>. runUnfold [``Function.toWp, origName]
188- let ⟨act, actPf, _⟩ <- act. simpAction
186+ let act ← runUnfold genExp (genName :: wpUnfold)
187+ let act ← runUnfold act [``Function.toWp, origName]
188+ let ⟨act, actPf, _⟩ <- simpAction act
189189 let mut attr : Array Attribute := #[{name := `actSimp}]
190190 simpleAddDefn actName act (attr := attr) («type » := ← inferType genExp)
191191 return (actName, actPf)
@@ -204,9 +204,9 @@ where
204204 -- transition that existentially quantifies over the state of the
205205 -- dependency, which is bad. Instead, we apply the `lift_transition`
206206 -- theorem, giving us a nicer lifted transition.
207- let ⟨actTr, _, _⟩ <- actTr. runSimp `(tactic| simp only [$(mkIdent `generatorSimp):ident, setIn, getFrom, lift_transition])
207+ let ⟨actTr, _, _⟩ <- runSimp actTr `(tactic| simp only [$(mkIdent `generatorSimp):ident, setIn, getFrom, lift_transition])
208208 -- After (potentially) `lift_transition` theorem, we simplify as usual
209- let ⟨actTr, _, _⟩ <- actTr. simpAction
209+ let ⟨actTr, _, _⟩ <- simpAction actTr
210210 let actTr <- mkLambdaFVarsImplicit vs actTr
211211 let actTr <- instantiateMVars actTr
212212 simpleAddDefn actTrName actTr (attr := #[{name := `actSimp}])
@@ -224,7 +224,7 @@ where
224224 let actTrStx <- `(fun st st' => exists ? $br ?, (@$(mkIdent actEName) $sectionArgs* $args*).toTwoState st st')
225225 let trActThmStatement ← `(forall ? $[$vd]* , ($actTrStx) = (@$(mkIdent actTrName) $sectionArgs*))
226226 let trActThm ← elabTermAndSynthesize trActThmStatement mkProp
227- let ⟨afterSimp, thmPf, _⟩ <- trActThm. simpAction
227+ let ⟨afterSimp, thmPf, _⟩ <- simpAction trActThm
228228 if !afterSimp.isTrue then
229229 throwError "[genSoundness] {trActThmStatement} could not be proven by `simp`"
230230 let proof ← match thmPf with
@@ -268,9 +268,9 @@ where
268268 genProcedure (baseName : Name) (genIName : Name) := do
269269 let procName := baseName
270270 let genExp := Lean.mkConst genIName
271- let act ← genExp |>. runUnfold (genIName :: wpUnfold)
272- let act ← act |>. runUnfold [``Function.toWp]
273- let ⟨act, actPf, _⟩ <- act. simpAction
271+ let act ← runUnfold genExp (genIName :: wpUnfold)
272+ let act ← runUnfold act [``Function.toWp]
273+ let ⟨act, actPf, _⟩ <- simpAction act
274274 let mut attr : Array Attribute := #[{name := `actSimp}]
275275 simpleAddDefn procName act (attr := attr) («type » := ← inferType genExp)
276276 return (procName, actPf)
@@ -345,7 +345,7 @@ where
345345 let liftedGenName := toGenName liftedActName mode
346346 trace[veil.info] "{ liftedGenName} := { liftedGenStx} "
347347 let genExp <- withDeclName liftedGenName do elabTermAndSynthesize liftedGenStx .none
348- let ⟨genExp, _, _⟩ <- genExp. simpWp
348+ let ⟨genExp, _, _⟩ <- simpWp genExp
349349 let genExp <- instantiateMVars <| <- mkLambdaFVarsImplicit actVs genExp
350350 let initAttr := if isInitialAction then #[{name := `initSimp}] else #[]
351351 simpleAddDefn liftedGenName genExp (attr := #[{name := `generatorSimp}, {name := `actSimp}, {name := `reducible}] ++ initAttr)
0 commit comments