Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small proof repair + coq-action update #1

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/coq-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ jobs:
strategy:
matrix:
coq_version:
- '8.14'
- '8.15'
- '8.16'
- '8.17'
- '8.18'
- '8.19'
- 'dev'
ocaml_version:
- 'default'
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,18 @@

## Building ViCAR

Tested with Coq 8.14-8.18.
Currently supports Coq 8.16-8.19.

To build ViCaR, run `make vicar`
To build ViCaR, run `make vicar`.

## Installing ViCAR through opam

To install ViCAR through opam, run
```bash
opam pin -y coq-vicar https://github.com/inQWIRE/ViCAR.git
```

To use the visualizer, first have [coq-lsp](https://github.com/ejgallego/coq-lsp) installed, then install the VSCode extension found at [https://marketplace.visualstudio.com/items?itemName=inQWIRE.vizcar]. After instantiating the appropriate typeclass you would like to visualize you can run the vizcar command in vscode to activate visualizing. The vizcar plugin only visualizes terms using the ViCAR grammar. To automatically take a term with an instantiated typeclass to the ViCAR grammar, use the `to_Cat` tactic.

## Examples

Expand Down
10 changes: 6 additions & 4 deletions ViCaR/Classes/BraidedMonoidal.v
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,15 @@ Lemma hexagon_resultant_1 {C} {cC : Category C} {mC : MonoidalCategory cC}
id_ B ⊗ B_ M, A ∘ B_ B, (A×M) ∘ associator A M B ∘ id_ A ⊗ (B_ B, M)^-1
≃ associator B M A ^-1 ∘ B_ (B × M), A.
Proof.
(* rewrite <- compose_iso_l. *)
pose proof (hexagon_2 A B M) as hex2.
rewrite <- (compose_tensor_iso_r' _ (IdentityIsomorphism _)).
replace (id_ A) with (IdentityIsomorphism A ^-1) by easy.
rewrite <- (compose_tensor_iso_r' (associator B M A ^-1 ∘ B_ B × M, A) (IdentityIsomorphism A) (B_ B, M)).
simpl.
rewrite 2!compose_iso_r.
rewrite !assoc.
rewrite <- compose_iso_l.
Check compose_tensor_iso_r.
replace (id_ B) with (forward (IdentityIsomorphism B)) by easy.
rewrite (compose_tensor_iso_r _ (IdentityIsomorphism _)).
rewrite assoc, compose_iso_l'.
symmetry in hex2.
Expand All @@ -93,6 +95,7 @@ Proof.
apply compose_cancel_r.
pose proof (hexagon_1 B A M) as hex1.
rewrite <- compose_iso_l'.
replace (id_ M) with (IdentityIsomorphism M ^-1) by easy.
rewrite <- (compose_tensor_iso_l' _ (IdentityIsomorphism _)).
simpl.
rewrite <- 3!assoc.
Expand All @@ -101,5 +104,4 @@ Proof.
easy.
Qed.


Local Close Scope Cat.
Local Close Scope Cat.
12 changes: 6 additions & 6 deletions coq-vicar.opam
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# This file is generated by dune, edit dune-project instead
opam-version: "2.0"
version: "0.1.0"
version: "0.1.1"
synopsis: "Coq library reasoning about categorical string diagrams"
description: """
inQWIRE's ViCaR is a library for reasoning about
inQWIRE's ViCAR is a library for reasoning about
categorical string diagrams
"""
maintainer: ["inQWIRE Developers"]
authors: ["inQWIRE"]
license: "MIT"
homepage: "https://github.com/inQWIRE/ViCaR"
bug-reports: "https://github.com/inQWIRE/ViCaR/issues"
homepage: "https://github.com/inQWIRE/ViCAR"
bug-reports: "https://github.com/inQWIRE/ViCAR/issues"
depends: [
"dune" {>= "2.8"}
"coq" {>= "8.12"}
"coq" {>= "8.16"}
"odoc" {with-doc}
]
build: [
Expand All @@ -30,4 +30,4 @@ build: [
"@doc" {with-doc}
]
]
dev-repo: "git+https://github.com/inQWIRE/ViCaR.git"
dev-repo: "git+https://github.com/inQWIRE/ViCAR.git"
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
)

(depends
(coq (>= 8.12))))
(coq (>= 8.16))))
Loading