This file contains hidden or 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
| import Mathlib | |
| theorem sqrt_two_core {m n : ℕ} (h : m.Coprime n) : m ^ 2 ≠ 2 * n ^ 2 := by | |
| intro hmn | |
| -- 2 ∣ m², and 2 is prime, so 2 ∣ m | |
| have hm : 2 ∣ m := Nat.Prime.dvd_of_dvd_pow Nat.prime_two ⟨n ^ 2, hmn⟩ | |
| obtain ⟨k, hk⟩ := hm | |
| -- substitute m = 2k and cancel a factor of 2 | |
| have hk2 : 2 * k ^ 2 = n ^ 2 := by | |
| have : 2 * (2 * k ^ 2) = 2 * n ^ 2 := by rw [← hmn, hk]; ring |
This file contains hidden or 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
| { | |
| "cells": [ | |
| { | |
| "kind": 1, | |
| "value": "## Bessel Functions in Three Dimensions", | |
| "languageId": "markdown", | |
| "outputs": [], | |
| "metadata": {} | |
| }, | |
| { |
This file contains hidden or 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
| ### A Pluto.jl notebook ### | |
| # v1.0.3 | |
| using Markdown | |
| using InteractiveUtils | |
| # This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error). | |
| macro bind(def, element) | |
| #! format: off | |
| return quote |
This file contains hidden or 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
| function rotating_squares(n_squares) | |
| %ROTATING_SQUARES Animate a chain of N squares linked at corners. | |
| % | |
| % Geometry | |
| % -------- | |
| % Each child square has sides 1/3 of its parent. One corner of the child | |
| % is pinned to the top-right corner of the parent and rotates about that | |
| % pivot. The child's angular speed is 3× the parent's, matching the | |
| % 1:3 perimeter ratio (rolling-contact analogy for squares). | |
| % |
This file contains hidden or 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
| using ModelingToolkit, OrdinaryDiffEq | |
| include(joinpath(@__DIR__, "parameters.jl")) | |
| # Independent variable | |
| @independent_variableusing ModelingToolkit, OrdinaryDiffEq | |
| include(joinpath(@__DIR__, "parameters.jl")) | |
| # Independent variable | |
| @independent_variables t |
This file contains hidden or 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
| # circular_equations.jl | |
| # Numerical verification for "Circular Functions" — Wild Peaches | |
| # Requires: Pkg.add("Polynomials") | |
| using Polynomials | |
| # ── 1. Cubic 3z³ − 9z² + 6z − 1 = 0, z = x² ────────────────── | |
| p = Polynomial([-1.0, 6.0, -9.0, 3.0]) # coefficients constant-first | |
| z_poly = sort(real.(roots(p))) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| package com.example.buckarootime | |
| import android.Manifest | |
| import android.content.pm.PackageManager | |
| import android.os.Bundle | |
| import android.os.Looper | |
| import androidx.activity.ComponentActivity | |
| import androidx.activity.compose.setContent | |
| import androidx.activity.result.contract.ActivityResultContracts | |
| import androidx.compose.foundation.layout.* |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| #= | |
| Solves a geometry problem using linear algebra and Heron's formula | |
| See: Red Flag Day Geometry | |
| using Revise | |
| Load with: includet("redflag.jl") | |
| =# | |
| using LinearAlgebra |
NewerOlder