Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: add support for heterogeneous equality at
processGenDiseq
- Loading branch information
1 parent
4a4473f
commit 6bc5433
Showing
2 changed files
with
29 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
inductive Ty := | ||
| int: Ty | ||
| other: Ty | ||
|
||
inductive Tensor := | ||
| int: Int -> Tensor | ||
| nested: List Tensor -> Tensor | ||
|
||
def hasBaseType: Tensor → Ty → Bool | ||
| .int _, Ty.int => true | ||
| .int _, Ty.other => true | ||
| .nested _, _ => true | ||
|
||
def flatten (e: Tensor) (τ: Ty) (h: hasBaseType e τ): List Int := | ||
match e, τ with | ||
| .int _, Ty.int => [] | ||
| .int _, _ => [] | ||
| .nested [], _ => [] | ||
| .nested (_::_), _ => [] | ||
|
||
theorem flatten_list (l: List Tensor) τ (h: hasBaseType (.nested l) τ): | ||
flatten (.nested l) τ h = [] := by | ||
simp [flatten] | ||
repeat sorry |