Double Brackets in LaTeX (\llbracket x \rrbracket)

⟦x⟧\llbracket x \rrbracket
LaTeX command
\llbracket x \rrbracket
Package
Add to your preamble:\usepackage{stmaryrd}
Mode
Math mode only

Where it is used

Wraps an expression in double square brackets, for denotational semantics or integer intervals.

This bracket pair gives the semantic function in formal semantics, \llbracket x \rrbracket_\rho for the value of x in environment \rho, and the discrete interval \llbracket m, n \rrbracket in combinatorics. It also appears in the Iverson bracket and in jump notation for discontinuities in numerical PDEs, \llbracket u \rrbracket = u^+ - u^-. Because the glyph is not in the default fonts, the source needs a symbol package; check the package note on this page. The hollow strokes make it visually distinct from nested ordinary brackets.

Minimal compilable example

Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.

⟦u⟧=u+−u−\llbracket u \rrbracket = u^{+} - u^{-}
\documentclass{article}
\usepackage{stmaryrd}
\begin{document}
Double Brackets: $\llbracket x \rrbracket$

\[ \llbracket u \rrbracket = u^{+} - u^{-} \]
\end{document}

Related symbols

All Brackets & Delimiters →

Frequently asked questions

How do I write Double Brackets in LaTeX?
Type \llbracket x \rrbracket in math mode, for example $\llbracket u \rrbracket = u^{+} - u^{-}$. Load stmaryrd first with \usepackage{stmaryrd}.
Which package do I need for \llbracket x \rrbracket?
\llbracket x \rrbracket needs stmaryrd: add \usepackage{stmaryrd} to your preamble before the document starts.
Can I use \llbracket x \rrbracket in text mode, or only in math mode?
Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\llbracket x \rrbracket$ in running text.
Math poweredWrite LaTeX using AI

Best AI LaTeX Editor, Overleaf Alternative

Octree helps researchers from 15+ universities write research papers faster using AI

  • Generate beautiful TikZ diagrams using AI
  • Upload image and convert it to LaTeX seamlessly
  • Get instant assistance with writing and formatting research papers