-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
modified how projection are reduced in
lsimp
should improve state of #20 but still not solved
- Loading branch information
Showing
3 changed files
with
109 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
import Std.Tactic.GuardMsgs | ||
import SciLean.Util.RewriteBy | ||
import SciLean.Tactic.LSimp.Elab | ||
import SciLean.Tactic.LetNormalize | ||
|
||
open SciLean | ||
|
||
|
||
/-- | ||
info: fun i => | ||
let j := 42; | ||
let foo := ((i * j, i + j), i ^ j, i / j); | ||
foo.fst : Nat → Nat × Nat | ||
-/ | ||
#guard_msgs in | ||
#check | ||
(fun i : Nat => | ||
let j := 42 | ||
let foo := ((i * j, i+j), (i ^ j, i / j)) | ||
foo.fst) | ||
rewrite_by | ||
lsimp (config := {zeta:=false}) only | ||
|
||
|
||
/-- | ||
info: fun i => | ||
(let j := 42; | ||
let foo := ((i * j, i + j), i ^ j, i / j); | ||
foo).fst : Nat → Nat × Nat | ||
-/ | ||
#guard_msgs in | ||
#check | ||
(fun i : Nat => | ||
(let j := 42 | ||
let foo := ((i * j, i+j), (i ^ j, i / j)) | ||
foo).fst) | ||
rewrite_by | ||
ldsimp (config := {zeta:=false}) only | ||
|
||
|
||
/-- | ||
info: fun i => | ||
(let j := 42; | ||
let foo := ((i * j, i + j), i ^ j, i / j); | ||
foo.fst).snd : Nat → Nat | ||
-/ | ||
#guard_msgs in | ||
#check | ||
(fun i : Nat => | ||
(let j := 42 | ||
let foo := ((i * j, i+j), (i ^ j, i / j)) | ||
foo.fst).snd) | ||
rewrite_by | ||
lsimp (config := {zeta:=false, proj:=false}) only | ||
|
||
|
||
/-- | ||
info: fun i => | ||
let j := 42; | ||
let foo := ((i * j, i + j), i ^ j, i / j); | ||
foo.fst.snd : Nat → Nat | ||
-/ | ||
#guard_msgs in | ||
#check | ||
(fun i : Nat => | ||
let j := 42 | ||
let foo := ((i * j, i+j), (i ^ j, i / j)) | ||
foo.fst.snd) | ||
rewrite_by | ||
lsimp (config := {zeta:=false}) only | ||
|
||
|
||
/-- | ||
info: let a := 42; | ||
a : Nat | ||
-/ | ||
#guard_msgs in | ||
#check | ||
(let a := 42 | ||
let b := 7 | ||
(a,b)).1 | ||
rewrite_by | ||
lsimp (config := {zeta:=false}) only | ||
|