Inspect locally
Do not run the notebook before reviewing it. If you already hold the files, these two calls verify the archive and open KaimonSlate's inactive view, which starts no worker and evaluates no cell. The full download-to-run workflow is below.
using DocumenterSlate
verify_slate_bundle("giac_tour.tar.gz")
using KaimonSlate
KaimonSlate.serve_notebook("giac_tour.jl"; inactive = true)
This notebook is arbitrary code. Instantiating its environment may run package build scripts, and live opening may execute cells. There is deliberately no one-click launch: each step below is an act you perform after reading the previous one.
1. Download
One call downloads the archive, checks every artifact against SHA256SUMS, cross-checks PROVENANCE.toml, and extracts the result. It evaluates no cell and instantiates no environment.
Copy the Download notebook link above — it is downloads/giac_tour/giac_tour.tar.gz on this site — and fetch it:
using DocumenterSlate
bundle = fetch_slate_bundle("https://<this site>/downloads/giac_tour/giac_tour.tar.gz")2. Verify
Step 1 raises rather than returning an unverified bundle, so reaching this step means the bytes are intact. If you took the download directory instead, check it with the checksums it carries:
sha256sum -c SHA256SUMSWhat checksums cannot establish, either way, is origin:
bundle.provenance["repository"]
bundle.provenance["git_sha"]
bundle.provenance["ci_produced"]Compare repository and git_sha against the repository you actually trust, and treat ci_produced = false as a locally built bundle. Provenance is build metadata, not a signature — anyone can serve a well-formed bundle.
3. Read
A KaimonSlate notebook is plain Julia source, and reading giac_tour.jl is the only step that tells you what the code would actually do. KaimonSlate can also serve a static view that starts no worker and evaluates no cell:
using KaimonSlate
KaimonSlate.serve_notebook(bundle.source; inactive = true)4. Run deliberately
Only after steps 2 and 3. Instantiating the environment may run package build scripts, and opening the notebook in live mode may execute anything. The three routes below are ordered by how much of your host they expose.
Isolated container (recommended) — keeps package installation and notebook inspection off the host. The image opens the notebook in inactive mode; it evaluates no cell:
podman build -t giac_tour-inspect . && podman run --rm -it -p 8765:8765 giac_tour-inspectAlternatively, open devcontainer.json in a compatible editor.
Pinned host environment — uses the published project and manifest, but runs package build scripts and notebook code with your host account's permissions:
julia --project=. -e 'using Pkg; Pkg.instantiate()'
julia --project=. -e 'using KaimonSlate; KaimonSlate.serve_notebook("giac_tour.jl")'Native application — installing and opening the application executes code with your host account's permissions:
julia -e 'using Pkg; Pkg.Registry.add(Pkg.Registry.RegistrySpec(url="https://github.com/kahliburke/SlateRegistry")); Pkg.Apps.add("KaimonSlate")'
slate --own giac_tour.jlA container reduces access to the host; it does not make untrusted code harmless. Review the mount and network permissions too.
Download source · Checksums · Provenance · Local instructions
| Artifact | SHA-256 |
|---|---|
Dockerfile | 25da180af2270a539f8a8e91d3af1bdf0767064bde4b32dc040b256430fad4da |
Manifest.toml | f2810a9c1f516c881f51e12fab61cc4585349cfe850622943394aa8a08efc065 |
PROVENANCE.toml | 607889aec2b3d4cad94f4a49bf5967f88402eb24278c6e0da20283fafcf76123 |
Project.toml | 47810962ec0e39b7dd20de00dcef692ba653519f69bb872450bf0eaa67688d07 |
README.md | ab1bca6e8637c8e7cc070c6cc456551aaff379049975b34f2b0091880d0c5944 |
devcontainer.json | 8be8328084037687160df70959100eac8afd58b6ea8ffba04e33851a5abd002f |
giac_tour.jl | 3fe5869421a9563bd3bb8eabeeef6024ab73cdfe2e7d135b51f16083c41fce97 |
giac_tour.tar.gz | 73ea90f23a96ae0bad24030bb9c8a8e33431cb3cc9e8162b17b6c54b87411cac |
ready — Giac (Xcas engine) + inline-math controls loaded; symbols x y z t s a b k nA Tour of GIAC
The whole Xcas computer-algebra engine, through live math fields
Every boxed expression below is a live math field (the giac"…" inline control). Click one, edit the math, press <kbd>Enter</kbd> — the cell recomputes and the answer updates. Each giac"…" is ordinary Xcas source, so all ~1800 GIAC commands are one keystroke away.
This is a working map of what the engine does well — algebra, calculus, linear algebra, number theory, transforms — and, at the end, an honest "here be dragons" list of the sharp edges I hit while building it.
1 · Algebra
The bread and butter: expand, factor, and simplify. The field holds the input; the cell's output is what GIAC makes of it. Try editing an exponent.
factor(giac"x^6 - 1")\[\left(x-1\right) \left(x+1\right) \left(x^{2}-x+1\right) \left(x^{2}+x+1\right)\]
expand(giac"(x + 2*y - 1)^3")\[x^{3}+8 y^{3}+12 x y^{2}+6 x^{2} y-3 x^{2}-12 y^{2}-12 x y+3 x+6 y-1\]
simplify(giac"(x^3 - x)/(x^2 - 1) + (2*x)/(x+1)")\[\frac{x^{2}+3 x}{x+1}\]
partfrac(giac"(2*x + 3)/(x^2 - 3*x + 2)")\[\frac{7}{x-2}-\frac{5}{x-1}\]
2 · Calculus
Derivatives, indefinite and definite integrals, limits, and series — the engine does them symbolically and exactly.
diff(giac"x^x + ln(x)*sin(x)", x)\[\frac{\sin x}{x}+\ln x\cdot \cos x+\left(\ln x+1\right) x^{x}\]
integrate(giac"1/(x^2 + x + 1)", x)\[\frac{2 \arctan \left(\frac{2 x+1}{\sqrt{3}}\right)}{\sqrt{3}}\]
(sqrt(pi), 1/6*pi^2)Two classics, evaluated exactly and dropped straight into prose by double-brace interpolation: the Gaussian integral $\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi }$ and the Basel sum $\sum_{k=1}^{\infty} \tfrac{1}{k^2} = \frac{1}{6} \pi ^{2}$.
taylor(giac"exp(sin(x))", x, 0, 6)\[\mathrm{e}^{\sin \left(6\right)}+\mathrm{e}^{\sin \left(6\right)} \cos \left(6\right) \left(x-6\right)+\frac{1}{2} \left(\mathrm{e}^{\sin \left(6\right)} \cos ^{2}\left(6\right)-\mathrm{e}^{\sin \left(6\right)} \sin \left(6\right)\right) \left(x-6\right)^{2}+\frac{1}{6} \left(\mathrm{e}^{\sin \left(6\right)} \cos ^{3}\left(6\right)-3 \mathrm{e}^{\sin \left(6\right)} \cos \left(6\right) \sin \left(6\right)-\mathrm{e}^{\sin \left(6\right)} \cos \left(6\right)\right) \left(x-6\right)^{3}+\frac{1}{24} \left(\mathrm{e}^{\sin \left(6\right)} \cos ^{4}\left(6\right)-6 \mathrm{e}^{\sin \left(6\right)} \cos ^{2}\left(6\right) \sin \left(6\right)-4 \mathrm{e}^{\sin \left(6\right)} \cos ^{2}\left(6\right)+3 \mathrm{e}^{\sin \left(6\right)} \sin ^{2}\left(6\right)+\mathrm{e}^{\sin \left(6\right)} \sin \left(6\right)\right) \left(x-6\right)^{4}+\frac{1}{120} \left(\mathrm{e}^{\sin \left(6\right)} \cos ^{5}\left(6\right)-10 \mathrm{e}^{\sin \left(6\right)} \cos ^{3}\left(6\right) \sin \left(6\right)-10 \mathrm{e}^{\sin \left(6\right)} \cos ^{3}\left(6\right)+15 \mathrm{e}^{\sin \left(6\right)} \cos \left(6\right) \sin ^{2}\left(6\right)+15 \mathrm{e}^{\sin \left(6\right)} \cos \left(6\right) \sin \left(6\right)+\mathrm{e}^{\sin \left(6\right)} \cos \left(6\right)\right) \left(x-6\right)^{5}+\left(x-6\right)^{6} \mathrm{order\_size}\left(x-6\right)\]
3 · Solving equations & ODEs
solve handles polynomial and transcendental equations (real roots); csolve finds complex ones; desolve integrates differential equations, initial conditions and all.
solve(giac"x^3 - 6*x^2 + 11*x - 6 = 0", x)\[\left[1,2,3\right]\]
csolve(giac"x^4 + 1 = 0", x)\[\left[\frac{1}{2} \sqrt{2} \left(1-\mathrm{i}\right),-\frac{1}{2} \sqrt{2} \left(1-\mathrm{i}\right),-\frac{1}{2} \sqrt{2} \left(1-\mathrm{i}\right) \mathrm{i},\frac{1}{2} \sqrt{2} \left(1-\mathrm{i}\right) \mathrm{i}\right]\]
# Damped oscillator released from rest at y=1: y'' + y' + 4y = 0.
# The whole call lives in one field so the `and`-joined conditions reach
# desolve unevaluated (see the "dragons" note at the end).
giac"desolve(y''+y'+4*y=0 and y(0)=1 and y'(0)=0, y(t))"\[\mathrm{e}^{-\frac{t}{2}} \left(\cos \left(\frac{1}{2} \sqrt{15} t\right)+\frac{1}{15} \sqrt{15} \sin \left(\frac{1}{2} \sqrt{15} t\right)\right)\]
4 · Linear algebra
Matrices are just nested lists, [[…],[…]], and they typeset as real matrices. Determinant, inverse, reduced row echelon form, eigenvalues, characteristic polynomial — all exact.
A = giac"inv([[1, 2, 0], [0, 1, 3], [2, 0, 1]])"\[\left[\begin{array}{ccc}\frac{1}{13}&-\frac{2}{13}&\frac{6}{13}\\\frac{6}{13}&\frac{1}{13}&-\frac{3}{13}\\-\frac{2}{13}&\frac{4}{13}&\frac{1}{13}\end{array}\right]\]
M = giac"matrix([[2,1,0],[1,2,1],[0,1,2]])"\[\left(\begin{array}{ccc}2&1&0\\1&2&1\\0&1&2\end{array}\right)\]
# Eigenvalues of a symmetric matrix (exact, with multiplicity)
eigenvalues(M)\[\sqrt{2}+2,2,-\sqrt{2}+2\]
# Characteristic polynomial in λ (here written l)
charpoly(M)\[\left[1,-6,10,-4\right]\]
5 · Number theory & exact arithmetic
Arbitrary-precision integers, primes, totients, the Chinese remainder theorem — and gcd even works on polynomials.
# The SAME gcd, on polynomials instead of integers:
giac"gcd(x^4 - 1, x^6 - 1)"\[x^{2}-1\]
# Exact big integers: the next prime after a quintillion (10^18):
giac"nextprime(10^18)"\[1000000000000000003\]
# Chinese remainder theorem: the x with x≡2 (mod 3), x≡3 (mod 5), x≡2 (mod 7).
# Result [r, m] means x ≡ r (mod m).
giac"chrem([2, 3, 2], [3, 5, 7])"\[\left[23,105\right]\]
Prime factorization: ifactor vs ifactors
ifactor factors an integer and typesets the prime-power product directly; ifactors (with the s) instead returns the flat [prime, exponent, …] list — handier when you want to consume the factorization programmatically rather than just read it off the page.
ifactor(360)\[5\cdot 2^{3}\cdot 3^{2}\]
ifactors(360)\[\left[2,3,3,2,5,1\right]\]
6 · Integral transforms
Laplace (and its inverse), Fourier, and the z-transform — the machinery behind the Laplace lesson.
# Laplace transform of a damped oscillation:
laplace(giac"exp(-a*t)*cos(b*t)", t, s)\[\frac{a+s}{a^{2}+2 a s+b^{2}+s^{2}}\]
# Fourier transform of a Gaussian is a Gaussian:
fourier(giac"exp(-x^2)", x, s)\[\sqrt{\pi } \mathrm{e}^{-\frac{s^{2}}{4}}\]
7 · Trigonometry
GIAC pivots freely between product, sum, and exponential forms — trigexpand opens multiple angles, tlin linearises products into sums.
trigexpand(giac"cos(3*x)")\[4 \cos ^{3}x-3 \cos x\]
# Linearise a product of sines into a sum:
tlin(giac"sin(x)*sin(2*x)*sin(3*x)")\[\frac{\sin \left(4 x\right)}{4}+\frac{\sin \left(2 x\right)}{4}-\frac{\sin \left(6 x\right)}{4}\]
8 · Complex numbers
i is the imaginary unit. Split into real and imaginary parts, take moduli and arguments, or watch Euler's identity fall out.
# Real and imaginary parts of a complex quotient:
giac"re((3 + 4*i)/(1 - 2*i)) + i*im((3 + 4*i)/(1 - 2*i))"\[-1+2 \mathrm{i}\]
# A root of unity, in exact rectangular form:
giac"exp(i*pi/3)"\[\frac1{2}+\frac{1}{2} \mathrm{i} \sqrt{3}\]
9 · 🐉 Here be dragons
The engine is enormous and mostly delightful, but building this tour turned up real sharp edges — worth knowing before you trust a result:
desolveis picky, and fails silently. Passing conditions as a list,desolve([ode, y(0)=1], y), returns an empty[]rather than erroring. Join them withand:desolve(ode and y(0)=1 and y'(0)=0, y(t)). And keep the whole call inside onegiac"…"field — thecommand(giac"…")form evaluates theand-conditions tofalsebeforedesolveever sees them.- Singular integrals are taken at face value.
integrate(1/x, x, -1, 1)returns0. The integrand blows up at0; GIAC hands back the (formal) principal value with no warning. modis a residue class, not a remainder.173 mod 12is5 % 12, a live modular object — arithmetic stays in ℤ/12. For the plain integer5, useirem(173, 12).- Bare symbols are assumed real.
conj(y)givesyandim(y)gives0until you declareassume(y, complex). - Series carry their remainder.
taylor/seriesresults include anorder_size(x)tail marking the truncation order.