Skip to content

Instantly share code, notes, and snippets.

View mukeshtiwari's full-sized avatar
💭
keep_learning

Mukesh Tiwari mukeshtiwari

💭
keep_learning
View GitHub Profile
Section Gcd.
Fixpoint gcd_rec (a b : nat) (acc : Acc lt b) {struct acc} : nat :=
match Nat.eq_dec b 0 with
| left _ => a
| right Ha => gcd_rec b (Nat.modulo a b)
(Acc_inv acc (Nat.mod_upper_bound a b Ha))
end.
Definition gcd (a b : nat) : nat.
@mukeshtiwari
mukeshtiwari / Wf.v
Last active January 25, 2024 17:16
(**
Skip to [Definition decode_aux] to see the main definition.
*)
Require Import Coq.Lists.List.
Require Import Coq.Relations.Relation_Operators.
Require Import Coq.Wellfounded.Lexicographic_Product.
Require Import Coq.Arith.Wf_nat.
Import ListNotations.
Require Import Coq.Init.Nat.
mukeshtiwari@Mukeshs-MacBook-Pro exercises % make
coq_makefile -f _CoqProject -o Makefile.coq
/Library/Developer/CommandLineTools/usr/bin/make -f Makefile.coq
COQDEP VFILES
*** Warning: in file MetaCoqPrelude.v, library All is required from root MetaCoq.Template and has not been found in the loadpath!
*** Warning: in file MetaCoqPrelude.v, library Checker is required from root MetaCoq.Template and has not been found in the loadpath!
*** Warning: in file MetaCoqPrelude.v, library Reduction is required from root MetaCoq.Template and has not been found in the loadpath!
*** Warning: in file ./MetaCoqPrelude.v, library All is required from root MetaCoq.Template and has not been found in the loadpath!
*** Warning: in file ./MetaCoqPrelude.v, library Checker is required from root MetaCoq.Template and has not been found in the loadpath!
*** Warning: in file ./MetaCoqPrelude.v, library Reduction is required from root MetaCoq.Template and has not been found in the loadpath!
Require Import Coq.Lists.List.
Require Import Coq.Relations.Relation_Operators.
Require Import Coq.Wellfounded.Lexicographic_Product.
Require Import Coq.Arith.Wf_nat.
Import ListNotations.
Require Import Coq.Init.Nat.
Require Import Lia.
Require Import Relation_Definitions.
Require Import Coq.Lists.List.
Require Import Coq.Relations.Relation_Operators.
Require Import Coq.Wellfounded.Lexicographic_Product.
Require Import Coq.Arith.Wf_nat.
Import ListNotations.
Require Import Coq.Init.Nat.
Require Import Lia.
Require Import Relation_Definitions.
Require Import Coq.Lists.List.
Require Import Coq.Relations.Relation_Operators.
Require Import Coq.Wellfounded.Lexicographic_Product.
Require Import Coq.Arith.Wf_nat.
Import ListNotations.
Require Import Coq.Init.Nat.
Require Import Lia.
Require Import Relation_Definitions.
Project C is big (4th year project, 3 months full time) and Project B is small (3rd year student, 1 month full time).
@mukeshtiwari
mukeshtiwari / git.migrate
Created November 5, 2023 13:35 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
Require Import Field_theory
Ring_theory List NArith
Ring Field Utf8 Lia Coq.Arith.PeanoNat.
Import ListNotations.
Section Computation.
Require Import List Utf8 Vector Fin Psatz.
Import Notations ListNotations.
Require Import Lia
Coq.Unicode.Utf8
Coq.Bool.Bool
Coq.Init.Byte
Coq.NArith.NArith
Coq.Strings.Byte
Coq.ZArith.ZArith