Skip to content

Instantly share code, notes, and snippets.

View utensil's full-sized avatar

Utensil utensil

  • 22:19 (UTC +08:00)
View GitHub Profile
@geo2a
geo2a / EquationalReasoningTacticNotation.v
Created January 4, 2020 18:42
Equational Reasoning in Coq using Tactic Notations
Tactic Notation
"`Begin " constr(lhs) := idtac.
Tactic Notation
"≡⟨ " tactic(proof) "⟩" constr(lhs) :=
(stepl lhs by proof).
Tactic Notation
"≡⟨ " tactic(proof) "⟩" constr(lhs) "`End" :=
(now stepl lhs by proof).
@fpvandoorn
fpvandoorn / typeclass_stats.lean
Last active December 3, 2020 02:33
prints stats about typeclasses and instances
import tactic -- all
open tactic declaration environment native
meta def pos_line (p : option pos) : string :=
match p with
| some x := to_string x.line
| _ := ""
end
import linear_algebra.basic
linear_algebra.direct_sum_module
linear_algebra.basis
linear_algebra.finsupp_vector_space
ring_theory.noetherian
data.finsupp
tactic
open_locale classical
@pedrominicz
pedrominicz / quotient_group_cardinality.lean
Last active July 24, 2020 18:22
Let G be an infinite group and let H be a subgroup s.t. |H| < |G|. Then |G/H| = |G|.
import group_theory.quotient_group
import set_theory.ordinal
-- https://math.stackexchange.com/a/370073/783124
namespace cardinal
open quotient_group
variables {α : Type*} [group α] {s : set α} [is_subgroup s]

Github to Discord Webhook Tutorial

In this tutorial I'll show you how to create a Github webhook that will post updates from your Github account to a channel in Discord. The steps are simple so follow along!

Create a Webhook in a Discord Channel

First you need to create a webhook in a text channel. We're assuming you have both Manage Channel and Manage Webhooks permissions!

  • Go in a channel properties (Alternatively, Server Settings, Webhooks works too)
-- A One-Line Proof of the Infinitude of Primes
-- [The American Mathematical Monthly, Vol. 122, No. 5 (May 2015), p. 466]
-- https://twitter.com/pickover/status/1281229359349719043
import data.finset.basic -- for finset, finset.insert_erase
import data.nat.prime -- for nat.{prime,min_fac} and related lemmas
import data.real.basic -- for real.nontrivial, real.domain
import analysis.special_functions.trigonometric -- for real.sin and related identities
import algebra.big_operators -- for notation `∏`, finset.prod_*
import algebra.ring -- for domain.to_no_zero_divisors
import data.dfinsupp
import tactic
universes u v w
variables {ii : Type u} {jj : Type v} [decidable_eq ii] [decidable_eq jj]
variables (β : ii → jj → Type w) [Π i j, decidable_eq (β i j)]
variables [Π i j, has_zero (β i j)]
def to_fun (x : Π₀ (ij : ii × jj), β ij.1 ij.2) : Π₀ i, Π₀ j, β i j :=
@eric-wieser
eric-wieser / finsupp_prod_equiv.lean
Last active July 25, 2020 09:41
An alternative formulation of finsupp.finsupp_prod_equiv
import data.finsupp
namespace finsupp.eric
#check finset.sigma
universes u v w
def bind_prod {α : Type u} {β : Type v} (sa : finset α) (fb : α → finset β) : finset (α × β)
:= (sa.sigma fb).map (equiv.sigma_equiv_prod _ _).to_embedding
@davidteren
davidteren / nerd_fonts.md
Last active October 27, 2025 21:58
Install Nerd Fonts via Homebrew [updated & fixed]
@azu
azu / README.md
Created June 6, 2021 07:13
Decrypt and restore iOS backup(`Manifest.db` is encrypted) for restoring my iOS photos.

Setup

Use https://github.com/jfarley248/iTunes_Backup_Reader

git clone https://github.com/jfarley248/iTunes_Backup_Reader
cd iTunes_Backup_Reader
# apply https://github.com/jfarley248/iTunes_Backup_Reader/pull/12
gh pr checkout https://github.com/jfarley248/iTunes_Backup_Reader/pull/12