text:
# Setting up NTP on Windows

It‘s very helpful that Meinberg have provided an installer for the highly-respected and high-accurate NTP software for Windows users - my thanks to them.  This Web page provides a quick guide to installing NTP on Windows XP, Vista, or Windows-7/8, using the standard out-of-the-box settings to sync your PC to the Internet, and then checking that you have a working installation.  These notes show why you would want to use NTP as opposed to other timekeeping software.  Some programs such as the excellent Plane Plotter even require that NTP be installed before you are allowed to use some of the more advanced features.

If you have more than one PC, you should install NTP as described below on each PC.  If you have more than a few PCs you may want to create one local time server (locked to the Internet) for your network and sync the other PCs to that local server, by adding one line to the configuration file.  More information is here.  This is easy, because the software will work as both a client to a remote NTP server, and as a server to which other NTP clients can connect.  For a rather low extra cost (US $35, £25) you can lock that local time server to GPS, making it far more precise than one locked to Internet sources. You might like to use something like a Raspberry Pi as a low-cost, stand-alone, precision time server. ## Installing Visit the Meinberg Web site (opens in a new tab), and look for the section entitled: NTP package with IPv6 support for Windows XP and newer . Look for the download icon and a file named ntp...setup.exe. Download the setup file and save it to your hard disk. ### Where to download software installation files I normally make a directory named C:\Install\ on new PCs, and it‘s where I out all my software which I‘ve downloaded. So in this case, I create a new directory named C:\Install\NTP\, and download the ...setup.exe file directly to that directory. As of July 2015, the current Meinberg version was named: ntp-4.2.8p3-win32-setup.exe (3.72 MB) I suggest right-clicking the downloaded file, select Properties, and clicking the Unblock button if it is present. This will remove one warning message before running the install procedure. Then run the setup.exe file by double-clicking. On Vista or Windows-7/8 you may need to allow the file to run by answering the UAC (User Authorisation Control) question, however, you don‘t have to disable UAC either to install or to run NTP. I have had one report that on a Windows-XP/64 installation, using right-click, Run as Administrator was required, otherwise the account created for NTP had insufficient privileges. The screenshots below are from an earlier Windows-8 installation. Assuming you agree to the terms, press I Agree. Select a location for the files - you have a choice to make here. ### Where to install NTP? In a single-user PC, in a benign environment, I recommend creating a directory called C:\Tools\ if you don‘t already have one, and putting the NTP software into C:\Tools\NTP\. I suggest this as the installation includes user-editable files, and C:\Program Files\ isn‘t an appropriate location for such data. This is because of the directory virtualisation which Windows Vista and Windows-7/8 perform, and you end up editing a file, but it‘s not the file which NTP will read. When you create the C:\Tools\ directory, give all users full control, by right-clicking the directory in Windows Explorer, selecting Properties, Security tab, Edit, Add. In the object names box, type "everyone", OK, ensure that "Everyone" is selected, and in the Permissions box, click on Full Control, OK. In a multi-user PC or one which is in a not so friendly environment, leave the default install destination folder as C:\Program Files\NTP\ (or whatever is suggested), but be aware that you may need to have Administrator rights when editing the configuration file. If you don‘t want to edit the configuration file, and most users will not, it‘s not a great inconvenience. Choose your directory and press Next to continue. Leave all the components selected, and press Next to continue. NTP can create an initial configuration for you using servers from the NTP Pool based on your geographic location. You should allow it to do this, as it saves you the task of choosing which servers to use. Ensure the box "Create an initial..." is checked, and select your nearest country or region from the drop-down list. In the example below, I have selected United Kingdom. NTP will then choose servers in your region to try and provide the nearest connection for best performance. Leave the other settings as the installer suggests. Once you have selected your region, press Next. Most users will not need to edit the file which the installer creates, so press No to continue. However, you may find that the security restrictions from the latest version of the Meinberg installer prevent NTP from seeing any external servers, so if all your servers later show the "INIT" state, please change the security "restrict" lines to the following: # Suggestions for NTP restrictions (accepting ntpq commands from the LAN): restrict source notrap nomodify nopeer restrict 127.0.0.1 restrict ::1 restrict 192.168.0.0 mask 255.255.255.0 One source suggests that with 4.2.7 and later, the second line above should be: restrict source nomodify noquery notrap NTP can create an account to run the software. NTP will run even while you are not logged into the computer ensuring even better timekeeping. The next dialog recommends that the installer will create an account for you, and that is the appropriate setting. It is recommended not to use the SYSTEM account. Leave the other options as suggested. Windows-8 & Windows-10 users: Although not recommended, please select the SYSTEM account, rather than the special NTP account. I‘m unsure why this is required, but until Meinberg update their installer, it will save you time later to select the SYSTEM account now. NTP will not function otherwise. One user reported problems as he had unchecked the "Disable other Time Services..." box below, and this lead to Windows and NTP fighting over the time setting, and NTP being unable to do its job. Unfortunately, the initial install had saved its settings in the file install.ini, so that when a re-install was attempted the same incorrect setting persisted. Editing the install.ini file restored the correct defaults and allowed a successful installation. Do check carefully if you are installing for a second time. Press Next and define a password for the account. Be sure to make a note of this password in case you need it in the future or for a re-install, but as the account has limited rights there is normally no need for it to be an ultra-secure password. Should you forget that password, you would need to remove the ntp account in the unlikely event of a re-install. One person got an Error 2245 from using too simple a password, or re-using the same password, but I‘ve had no other reports. Once you press Next, the installation completes, and the NTP service is started. #### Windows-8.1 and Windows-10 On a recent Windows-8.1/64 completely fresh install, and on a Windows-10/32 fresh install, I have had error messages at this point about the service not being started, and it seems that using the SYSTEM account is the easiest way round this issue. Likely this is related to the issues mentioned below. ### You may need to allow programs through the Windows Firewall Like any programs which access the Internet, NTP may trigger your firewall software into asking you if it‘s OK for NTPD to access the Internet. Be sure to allow ntpd.exe both incoming and outgoing access (called "Act as a server" in Zone Alarm). There is also a support program (ntpq.exe) you can use to query how well NTP is working either on your own system or any system you have access to in you locally or on the Internet, and that may also need to be allowed through your firewall. How to add a program to the firewall for Windows-7. The programs will be found in C:\Tools\NTP\bin\ if you have been using the suggested paths. Allow ntpd.exe to accept incoming UDP requests through the firewall if you intend to set up a local NTP network. If you haven‘t disabled the hiding of file extensions the programs may show simply as "ntpd" and "ntpq". I do recommend that you allow Windows Explorer to show file extensions so that you will be less confused. Although it should not be necessary, you may want to review the Control Panel, Date and Time dialog, the check-box suggesting that Windows automatically synchronise with an Internet server. There is no need for this setting as NTP does a much better job, indeed - this box must be unchecked for NTP to work correctly. You can now repeat this installation for each of the PCs on your network. On Windows-10, this Control Panel setting has been removed. Instead, enter the PC Settings menu, Time & language, Date & time tab. Ensure that the setting "Set time automatically" is set to Off. To check that NTP is installed and running (from the disable W32Time settings), using the Task Manager: • On the Details tab, check that there is no program "w32time.exe" running (click on "Name" to sort by name). • On the Services tab (click to sort by name again), check that the W32Time service is Stopped. You should also check in the Control Panel, Local Services, that the Windows Time service is set to Disabled. ### Routers No special configuration should be needed for the majority of routers, as support for NTP (UDP packets on port 123) is already built-in. ### Using with a virtual PC #### VMware VMware publish their own recommendations for using NTP in a virtual PC environment. These recommendations have changed with the various software releases, so it‘s best to check the VMware Web site for the current ideas. #### Microsoft Hyper-V With the Microsoft Hyper-V 2012 software, some suggestions from Steve Walker (who needs good timekeeping for the excellent Plane Plotter software ) are: • Host PC configuration: • NTP: installed and working • OS: Microsoft Windows Server 2012 Standard • Virtual PC: Hyper-V 2012, with the Time Sync option enabled for the client • See this screen-shot , where the setting is shown in its disabled state, you want to be sure it‘s checked. • Virtual PC configuration: • OS: Microsoft Windows XP SP3 • Application software: Plane Plotter 6.3.6 Steve Walker comments: I made sure the Hyper-V Time Synchronisation Service is started, as this will then allow the client to sync its time with the host. #### Domain Time II If the timekeeping from Hyper-V Time Synchronisation Service isn‘t good enough for you, you may be interested in Domain Time II noted by Larry Ellis - he writes : I ended up getting an amazing little$20 time client call Domain Time II from
www.greyware.com. It appears to
do a fantastic job in the VMs (<15ms error most of the time).
Of course, it has to sample pretty frequently to get that value, but
fortunately I have a physical NTP server (thanks!) on the LAN that will
provide that capability.
They have a server component, too.
You can pick a free evaluation of the software if you‘ve not seen it and want to take a look. They did a great job.

## Checking it‘s working

Check after a few minutes, to allow the program to connect to
the Internet.  If you are comfortable working with the command-line,
obtain a command prompt (Start, All Programs, Accessories, Command
Prompt; or
Windows-key-R, cmd), and simply enter the command:

ntpq -pn

Note that the "-pn" must be lower-case, and that
there must be a space between the "ntpq" and the "-p".
An alternative command which may work a little quicker is "ntpq -pn".
You should get output similar to the display below.
Alternatively, from the Start menu, select Meinberg, Network Time Protocol,
Quick NTP status - which gives you a handy ntpq display which automatically
refreshes every ten seconds.  This screen-shot was taken immediately after
starting, so the poll is 64, and the reach only"1".

Note that the two screen-shots below were taken with "ntpq -p",
which includes the resolution of numbers to names.  Using the "-pn"
version suggested above is quicker.

After some time running, the output might look more like this
(synthesised) screen-shot:

where you can see that one server (linnaeus) has an asterisk
(*) as the first column, and a reach of 377.  This likely indicates that
all is well.

Interpreting the ntpq output:

• The display is a list of remote servers with various status
reports arranged in columns.
• One remote server should have an asterisk (*) in the
first column.  This marks the server which NTP has selected as the current
preferred source.
• Servers which have a plus sign (+) are good enough for NTP
to sync to, others are not.
• The reach column should not be 0, and will expand
from 1 during
the normal working of NTP until it reaches 377.  It is an octal display
of a bit-mask showing when the server was reached.  In the screenshot,
NTP has been running for less than a minute, and hence only made contact
once with each server.  Normally you expect to see 377 in this column
against each server.  A column of all zeros means that NTP can‘t
contact any servers - check your firewall settings.
• The offset shows how far your PC is off from a nominal UTC,
and the value is in milliseconds.  So the PC above is within about
1/40s of correct time!
• The poll value should gradually increase from 64 seconds to
1024 seconds as NTP needs to contact the server less and less frequently as
the clock offset and frequency are gradually corrected.  Changing the
poll is automatic in NTP.
• The delay shows the time for a packet from your PC to reach
the remote server and vice versa.  Values above 150ms may indicate a
satellite circuit and it‘s best to avoid such servers if possible.  You
will get best performance from servers which are close to you on the
network.
• The jitter column shows how stable the connection between
you and the remote server is.
• The st column shows the stratum of the server,
with stratum 1 servers having a local reference such as an atomic clock or,
servers you will see are at stratum 2, so they are locked to a stratum-1
server.  A lightly loaded stratum-2 server is probably a better
reference than a heavily loaded stratum-1 server such as those with widely-publicised

Meinberg provide further information here
Once basic operation is OK, if you wish to experiment I recommend you update to a more
, as the one in the Meinberg install is the "stable"
release, but the "development" versions have some performance and operational advantages.

## Troubleshooting

NTP s a network application, so the basics of troubleshooting
any network application apply.  In today‘s Windows environments:

• Check firewall access.

• Are the programs ntpd.exe and ntpq.exe
"known" to the firewall?
• Do they have both incoming and outgoing access enabled?
• In Zone Alarm, this means "Act as a server".
• Are the access requests from the firewall software
enabled - you aren‘t missing any?
• Can you PING and TRACERT to the ntp server in question?
• Be aware that this is a poor test today, as many
networks and servers disable PING access.
• Can you use the "ntpq  -p" command as shown
above against a server your PC is trying to use?

• Again, this can be a poor test, but I found one server
which responds:  louie.udel.edu, however, many servers now prevent
such access.

• Do you get a similar result running "ntpq
-p" on its own?
stratum-1 servers require that you contact them before accessing.  Look
for an "open access" server.  There is a list of servers here.

Note that NTP has a maximum clock error it will correct of 500ppm
(43.2 seconds per day, or 1.8s per hour), so if you see the offset
gradually increasing by more than this rate you know that your PC‘s
clock is too inaccurate to disciplined by NTP.
But there is a work-round reported by one user - set up a scheduled task
to run
twice (or more often) a day to stop and restart the NTP service.
Cunning!
You can also tell NTP what your clock drift rate is
and that may help.
For more complex issues, be aware of http://support.ntp.org
and its "Support" web - it‘s a wiki, you may add or change content there.

### Service will not start

This may be due to the lack of one or more DLLs

• The Microsoft Visual C++ 2008 (x86) runtime library is required.
install the runtime
library
.
• If you have chosen not to install the SSL components above (which
was not what I recommended), the service will not start as these components are
required.  Simply run the install again, selecting the "Update
files" option.

### I get "System error 5 - access is denied" when starting NTP

If you use the Meinberg menus to stop, start or restart NTP on Windows Vista,
Windows-7 or later, you will likely get the error message above.  This is
because administrator privilege is needed to stop and start services.  The
solution is to right-click the menu item, and select "Run as

### I get a message like "no associations found" from running ntpq -p

Check that your configuration file (C:\Tools\NTP\etc\ntp.conf) does contain
server entries, such as in this sample simplified configuration file:

# Use drift file
driftfile    "C:\Tools\NTP\etc\ntp.drift"

# Use NTP servers from the ntp pool project (see http://www.pool.ntp.org)
server    0.uk.pool.ntp.org    iburst
server    1.uk.pool.ntp.org    iburst
server    0.nl.pool.ntp.org    iburst
server    1.nl.pool.ntp.org    iburst

### Use the Event Viewer

Windows records events from programs including NTP in the Event Log.  You can use the Windows Event Viewer to look at events which NTP records as a help in diagnosing more difficult issues.  There is more information about the Event Viewer for Windows XP, and Windows Vista and Windows-7 as the format is different between Windows versions.

Look at the Application log by clicking on "Application":

You will see a list of events from all sources, not just NTP,
with the most recent events at the top.  Now use the View | Filter...
the Event Viewer to select only those events from  NTP.

In the event source, select NTP from the drop-down list, and
click the OK button.

Now double-click on one of the NTP events, in particular those
with an Error status and the red cross.

and see what the actual NTP message is, for example:

You can use the up and down arrows to scroll through the NTP messages.

There is more
information about using the Event Viewer on the Internet, for example, here
You will get some event information messages as NTP starts and these are quite normal,
and you will get occasional messages during the normal running of NTP.  Look out for those which indicate failure.

### Use the Administrative Tools, Services program

You can check that the NTP service is running and, perhaps
more importantly that the W32Time (the older Windows time service) is stopped
using the Services applet.  This may be found under the Control Panel, Administrative
Tools options with Windows XP.

Check that:

• The service "Network Time Protocol" is shown as
Status: Started, and Startup: Automatic.
• The service "Windows Time" is shown as Status:
(blank), and Startup: Disabled

### Broken PC clock

#### A clock near the 43 seconds/day limit

If the file ntp.drift in your ..\ntp\etc\ directory consistently shows a
value near +/- 500, and NTP stops working, then it may be that your PC‘s clock
is outside the normal limits for NTP (a drift of up to +/- 43 seconds per day is
allowed).  A new feature in ntp-4.2.6p4 and later allows you to provide a base offset
value to NTP when it starts, so that the +/- 500 ppm (parts per million) applies
to that base value, rather than being an absolute limit.  So your clock
must be well behaved, but need not be quite so close to correct.  There are
two steps to using this new functionality:

• Set the system environment variable: NTPD_TICKADJ_PPM to the value you
need.  On Windows XP, this is through the Control Panel.  System..., System, Advanced..., Environment variables
button, System variables.  Add a New system variable, with the name
NTPD_TICKADJ_PPM and the value 500 (or -500 if your ntp.drift was limiting
at its negative extreme).
• Install ntp-4.2.6p4 or later.  You can download the new version here:
http://davehart.net/ntp/win/x86/ntp-4.2.6p4-win-x86-bin.zipIf you already have ntp-4.2.6p5 from a Sep-2012 Meinberg installation
there is no need to update.
Services application, stop NTP (Network Time Protocol), save the .EXE files
from your ..\ntp\bin\ directory (in case you need to revert), and copy the
Services, and check for correct operation.  As the files have changed,
you may need to tell your firewall to allow the new programs incoming and
outgoing access.

You may need to repeat the set environment variable/restart NTP loop a number
this myself, I guess you would try and get a value in the ntp.drift file of,
say, under 100, after an hour or two of operation.  Have patience!

#### Power-saving features may cause problems

It‘s also possible that your PC clock appears broken to NTP, while the actual
issue is some software which is tampering with the CPU speed.  If you have
some power-saving features enabled, you may try disabling those features and see
whether NTP‘s performance improves.  Symptoms may include the PC keeping
time correctly until some CPU-intensive activity is commenced.

#### Windows systems in a domain

##### Hartmut Schulla reports:

On Windows Server 2008, 64-bit, release 2,
I needed to run ntpd.exe as Administrator.  Right click and go to properties of
ntpd.exe.
Select compatibility tab and check "Run as Administrator" for all users.
In the service settings select "local system account" instead of the special account created by setup.
It seems for me, only "local system account" has necessary rights to access "windows time".

ntpq -p is further not working in Server2008R2 => timeout.  I don‘t understand why .....
but "NTP Time Server Monitor" as replacement for ntpq from the Meinberg website works fine.
Also "NTP Time Server Monitor" requires "run as administrator".
[DJT later comment]  This issue may be due to the machine having
both an IPv4 and an IPv6 address.  Try using ntpq
-p 127.0.0.1 instead to force the use of the IPv4 address.  The
NTP Time Server Monitor only needs to be run as Administrator if you
want to use the start and stop service commands, and this is to be expected.

##### Patrick O‘Keeffe reports:

I installed NTP 4.2.8 on a domain-controlled Windows 7 Professional
x64 machine today and I have feedback for your NTP setup troubleshooting
section.

In particular, I was able to avoid both (a) using ‘Run as Administrator‘ compatibility mode on
ntpd.exe and (b) running the daemon under the Local System Account by updating two Local Security Policies.

• Launch secpol.msc
• Browse to Local Policies => User Rights Assignment
• Add the ntp account to these policies:
• Change the system time
• Log on as service

On my machine, before the change system time permission was enabled, I would see these error messages in the Application Event Log:

• SetSystemTime failed: A required privilege is not held by the client.
• Can‘t adjust time: A required privilege is not held by the client.

This machine has both IPv4 and IPv6 enabled so I suspect it‘s nearly always the
Change system time security policy not being modified.  By default, that right is only available to admins & power users (ref:
http://msdn.microsoft.com/en-us/library/ms813808.aspx).

### Other issues

• If NTP doesn‘t appear to start, use the Start NTP entry
which Meinberg provides for you in the Start button, All Programs, Meinberg,
Network Time Protocol, Service Control menu set.  You may then see
messages such as "Unable to log on", and then check the event
viewer
for more details.
• Once you have defined the password for the NTP account, the
setup procedure doesn‘t allow you to change it.  Keep using the
• I found that when updating Windows-10 preview to a different version, the ntp
account was not deleted, but a subsequent install of NTP would not use the
old account, or create a new one from scratch.  The error appeared to
be logon password.  As that system was not used on the Internet, and
was not providing any services to the Internet, I used the system

The Meinberg site uses NTP 4.2.6p5, which is current and works well.
The command:

ntpq -crv

will include a list of parameters, including the version information on the second line.

If you do want to experiment:

1. Copy (not Move!) all the .exe files in ..\NTP\bin\ to a fresh directory for safe keeping,
just in case you need to revert.
2. Download and save the new version (I suggest the latest as I will have
tested that
version) from this Web page.
3. Right-click the Zip file, Properties, click the Unblock button if it is present.
4. Stop NTP with the Administrative Tools, Services program.  It may be
shown as Network Time Protocol Daemon.
5. Copy the files from the Zip download on top of those in ..\NTP\bin\
6. Restart NTP.

Any problems and you simply reverse the steps and use the version you saved
in step (1).  The later versions of NTP offer more options, and fix a few

### Using the "pool" directive

With NTP 4.2.6p5 (as installed by a recent Meinberg release), you can make a
saving on the lines in the ntp.conf file, and get access to what NTP considers
to be the most appropriate number of servers by replacing the lines:

# Use pool NTP servers
server 0.uk.pool.ntp.org  iburst
server 1.uk.pool.ntp.org  iburst
server 2.uk.pool.ntp.org  iburst
server 0.nl.pool.ntp.org  iburst
server 1.nl.pool.ntp.org  iburst

with the single line:

# Use pool NTP servers
pool uk.pool.ntp.org  maxpoll 6 iburst

NTP will determine how many servers it should connect to automatically, and it may be more than the few from a default installation.  Perhaps of more significance is that NTP monitors the connectivity to each server in a "pool", and if a server goes down it will try to connect a different one, thus maintaining a good number of working servers.  The pool directive introduces a new line to the ntpq -pn output - don‘t be put off by the line showing stratum-16, this is normal, and the pool servers below that line will show normal connectivity.  The top four servers are local to my network, and those below the .POOL. line are from the Internet over the WAN.  This is from a Windows-7/32 system where the jitter is limited to a minimum value of 0.977 milliseconds.  The maxpoll 6  in the configuration is to work round a different problem with some versions of Windows where a system call limits the precision with which the clock rate can be set.

## Recipe for building NTP from the source

Some notes on rebuilding NTP from the source code.  Likely to be
peculiar to my system and possibly incomplete.  Typically, you will not
need to recompile the source, so please treat this section as guidance and notes
only, and not bullet-proof step-by-step instructions.  Good
luck!

#### What do I install?

download the entire Visual Studio 2010 Express CD (as an ISO file) as you might
want to re-install later, when Microsoft have withdrawn this version, or you
might want to try some of the other components.  Install the compiler to
the default location, unless you are tight on space on the system drive.

installation so that you can get the source files for compiling programs to run
with OpenSSL.  However, you don‘t need the full OpenSSL installed as
such for compiling, you only need the files for software development, so when asked whether the binaries should be
copied to the Windows system directory, answer "no".  After
installation, look to see what environment variables have been set for
OpenSSL.  On a second install on a different PC, I did not see these set,
and had to set them manually.  You need at least two, and on my first system these were:

OPENSSL_INC=D:\Tools\openssl\OpenSSL.1.0.0c\inc32
OPENSSL_LIB=D:\Tools\openssl\OpenSSL.1.0.0c\out32dll

On the second PC, I installed to C:\Tools\OpenSSL and required the following:

OPENSSL_INC=C:\Tools\OpenSSL\lib
OPENSSL_LIB=C:\Tools\OpenSSL\bin

The compile will look for the OpenSSL files by referencing these environment variables.  The %OPENSSL_INC% directory contains a sub-directory "openssl", which contains files starting "aes.h".  Locate that directory and take a copy.  The %OPENSSL_LIB% directory contains files with "aep.dll" as the first or second file.  What I did on my first PC was to copy the files from the as-installed OpenSSL directories into the directories which I already had from a previous installation.

On the first PC, the NTP compile will also require a couple of library definition files from the OpenSSL install to be in the out32dll directory.  Locate the files: libeay32.lib and ssleay32.lib  in the OpenSSL install tree, and copy them to your out32dll directory.  Then take a backup of that directory as well.  Once you have self-contained, populated %OPENSSL_INC% and %OPENSSL_LIB% directories, you can uninstall OpenSSL.  I suspect that my lack of C/C++ experience may have led me to make a poor choice for either the install directory or the %OPENSSL_LIB% environment variable.

Finally you can download the source code.  It will be in the form of a 6 MB UNIX zipped archive, such as: ntp-dev-4.2.7p326.tar.gz.  I find that the easiest way to unzip this is to send it to the 7-zip File Manager, where it appears as a file of unknown properties, double-click on that file and it turns into a directory within the 7-Zip File Manager,  and then just drag that directory on to your desired location in an open Windows Explorer window.  In my case, I wanted to put the source into D:\Tools\, so after the drag-and-drop I ended up with a directory:

D:\Tools\ntp-dev\ntp-dev-4.2.7p326\

#### Compiling

The NTP source comes ready to compile in Visual Studio 2005, 2008 and 2013, but not 2010.  However, this is no problem, as VS 2010 will convert the .SLN (solution) file into the new format.  Locate the file:

D:\Tools\ntp-dev\ntp-dev-4.2.7p326\ports\winnt\vs2008\ntp.sln

and double-click on it.  If you have more than one VS2010 product installed, you may need to right-click on the ntp.sln file and select: Open with, Visual C++.  At this point, Visual Studio will invite you to convert the project, so allow it to do so.  There should be no errors.  On the top line of Visual Studio there are three drop-down lists.  On the first drop-down, select "Release" (chooses between making a Release or a Debug version).  The second should be "Win32", and the third will depend on your last search.  Then, from the Debug menu, select Build Solution (or press F7 - being a Delphi man I am more used to pressing F9!).  After a few minutes (it would be a few seconds in Delphi), you should get a message "== Build: 9 succeeded, 0 failed, 0 up-to-date, 0 skipped ==" or similar.  If you get errors, I am the last person to ask!  Sorry!

#### Installing the newly compiled version

The new files will have been created in:

D:\Tools\ntp-dev\ntp-dev-4.2.7p326\ports\winnt\vs2008\Win32-bin\Release\

It may be most convenient to sort that directory by Type (click on the Type column header), and you will see 6 .EXE files and one .DLL.  There may be more or fewer .EXE files.  My own practice is to:

• Use the Services manager to stop NTP
• Copy the new ntp*.exe files from the Release to my ..\ntp\bin\ directory
• Use the Services manager to start NTP

In fact, I do this so much that I made a batch file for the task, which needs to be run as  administrator in Windows Vista and later.  The core of the file is:

set DEST="C:\Tools\NTP\bin\"
net stop ntp
copy ntpd.exe %DEST%
copy ntpdate.exe %DEST%
copy ntpdc.exe %DEST%
copy ntp-keygen.exe %DEST%
copy ntpq.exe %DEST%
net start ntp
timeout 20
ntpq -crv -pn

I‘ve coded it this way - with the %DEST% - because I have a similar file on each of my systems which run NTP.  I can set DEST according to the needs of the particular PC, leaving the bulk of the file unchanged.  In practice, providing you are staying within the same major version (i.e. 4.2.7), copying the ntpd.exe alone is likely to be sufficient.  My actual file has some logging as well.  The ntpq call at the end of the file provides a check that the update has produced a working ntp, after the 20 second delay produced by the timeout command.

If working on Windows XP, the timeout command is not available, and can be replaced by:

ping -n 20 127.0.0.1

#### OpenSSL version issue

Earlier versions of the Meinberg NTP were distributed with OpenSSL 0.9.8, and later versions with 1.1.0c.  However, we have found that if you compile with 0.9.8k the resulting NTP executable files will not run on a system with the 1.1.0c DLLs, and vice-versa.  The working compromise appears to be to get version 1.0.0c OpenSSL, as the resulting .EXE files will run on systems with either OpenSSL DLLs.  Thanks to Dave Hart, I managed to locate a copy of this version, which I have placed here.

#### A catch for Windows 2000

Programs compiled with VS 2010 don‘t run on Windows 2000.

#### Fix needed for NTP 4.2.7p349-356

Between NTP 4.2.7p349 to 4.2.7p356, a small edit was required to two of the files which were incorrectly automatically generated.  The fixes are described here.

## Why NTP?

People sometimes ask why they should use this NTP software,
rather than the W32Time service built into Windows, or other so-called
"atomic time" programs.

• NTP uses multiple servers, and automatically chooses the best one based on
continuous monitoring.  If a server goes down, another one is selected without user intervention.
By comparison W32Time, like many clock programs, only uses a single server.
• NTP contacts the servers only as frequently as needed, between once a minute and once every
17 minutes.
W32Time, by default, only contacts servers once a week, so your PC could be
minutes out between corrections!
• NTP from the Meinberg installation will try and use pool
servers
located nearer to you for better performance, and not servers located a
continent away.
• NTP runs as a service once setup - it will even keep time
while you are logged off your PC.
• NTP is much more accurate:
• NTP alters the clock rate, as well as initially setting the
clock time, so that the clock will stay as close as possible to UTC
between corrections.
• Once NTP is running, the time is not routinely stepped, but is
• Time will normally not step backwards.
• Leap seconds are handled without user intervention, and without
stepping the PC‘s clock.
• Even on Windows, accuracies down to the millisecond level can be
achieved with suitable configurations - required for certain software.
• You can use your own time sources with NTP, such as a radio-clock or
GPS receiver, and it will then work independently of an internet
connection, such as when you are out in the field.
• You can run NTP on many operating systems including Windows, Linux,
FreeBSD and the
Mac OS, so managing and
monitoring NTP expertise doesn‘t need to be re-learned.
• NTP provides comprehensive performance checks, other programs
typically do not.  Monitoring can be across the network from a central
point, if needed.  Here is an example of automated
NTP monitoring
.
• NTP is open-source software, 100% compliant with the
Internet protocol for network time.

## The Next Step forward - your own precision time server

Having appreciated the benefits of installing NTP, you may wonder about
keeping precise time when the Internet goes down, or on a PC without an Internet
connection, or perhaps you want your PC(s) to keep even closer time than NTP
provides as standard?  The answer is to setup your own Stratum-1 reference
server, and you can do this either using Windows, Linux or FreeBSD
No extra software is required as the NTP install can act as both a client to a
remote server, or as a server itself to local PC clients.
NTP is a very small load, so you can run it as an extra on an existing PC
without impacting the work which may be running there.  All you need is a
GPS device which outputs a PPS (pulse per second) signal, and these are usually accurate
to within a microsecond even on the lowest cost of today‘s GPS timing
devices.  For a low-cost device, I recommend the Sure
Electronics GPS evaluation board
, and I have written up a page on how
to use the Sure board
.  This costs about £25 (US \$35) including the
magnetic puck antenna and USB lead, so it is unlikely to break the bank!
There are alternatives listed on my Raspberry
Pi NTP server
page, and you will have fun making a Raspberry Pi NTP server!

Once you have one accurate PC within your network, you can sync the other PCs
to that either other the LAN or with a wireless connection, and all PCs will
have improved accuracy compared to an Internet-only synced configuration.
Note that you may need to set your firewall software so that PCs other than your
main server can access NTP - set NTP to allow inbound access as described here
To test, be sure that you can run:  ntpq -pn
<my-time-server>  from a client PC.  If you get a
time-out response, likely it‘s a firewall issue.
When the PCs are only talking to LAN servers, you can make them even more
precise by polling your local reference clock more frequently, and lessen your
load on the Internet servers by polling them less frequently, so you might use
configuration file such as:

# Use local stratum 1 server
server my-time-server iburst maxpoll 5 prefer

# Use pool NTP servers
pool  uk.pool.ntp.org  minpoll 10  iburst

Replace my-time-server by the name or IP address of your local accurate PC.  A configuration such as this makes the PC poll the local stratum-1 server every 32 seconds (2**5), but only poll the Internet servers once every 1024 seconds (2**10).  You should keep the Internet servers as a backup, though, in case your local NTP server fails or loses GPS lock or whatever.  Why not make this your next project?

## Running a publicly accessible NTP server

If you are running a server which is accessible from the public Internet -
perhaps you are contributing to the NTP
Pool
project - there are some simple precautions you should take to ensure
that your server is not used as the source of an attack on other PCs.  Note
that this doesn‘t apply to most end-user clients sitting on your local PC, you
would need to have specially opened a port in your firewall or router to allow
public incoming unsolicited UDP port 123 packets into your local network.
protected.  The following notice explains more:

NTP users are strongly urged to take immediate action
to ensure that their NTP daemon is not susceptible to use in a reflected
denial-of-service (DRDoS) attack. Please see the NTP
Security Notice
for vulnerability and mitigation details, and the Network
Time Foundation Blog


text:
### Home > APCALC > Chapter 4 > Lesson 4.2.4 > Problem4-83

4-83.

Chang Young is attempting to evaluate the following integral: $\int _ { 1 } ^ { 5 } ( 5 x + 2 ) d x$.
He writes the following steps:

$\left. \begin{array} { l } { \frac { 5 } { 2 } 5 ^ { 2 } + 2 ( 5 ) + C - \frac { 5 } { 2 } 1 ^ { 2 } + 2 ( 1 ) + C } \\ { \frac { 5 } { 2 } \cdot 25 + 10 + C - \frac { 5 } { 2 } + 2 + C } \\ { \frac { 125 } { 2 } - \frac { 5 } { 2 } + 12 + 2 C } \\ { \frac { 120 } { 2 } + 12 + 2 C } \\ { 60 + 12 + 2 C } \\ { 72 + 2 C } \end{array} \right.$

He knows that this is a definite integral and there should not be any $C$s in his answer. Also, the answer key says the answer is $68$. He needs your help to find his error and figure out how to eliminate his $+ 2C$.

His error is in the first line. How does he use or not use the Distributive Property?

format: plain


text:
# Dealing with InterpolatingFunction in Compile

I have rather large equations that profit a lot from compiling, unfortunately they require input from external numerics and need to be interpolated.

In the end this costs a lot of performance as InterpolatingFunction triggers a MainEvaluate.

A minimal example:

testInt = Interpolation[{{0., 0.}, {2.5, 2.5}, {5., 5.}, {10., 10.}, {15.,
15.}}];

testCompile = With[{testInt = testInt},
Compile[{{x, _Real}, {a, _Real}},
testInt[a*x], CompilationTarget -> "C",
"RuntimeOptions" -> "Speed",
CompilationOptions -> {"InlineExternalDefinitions" -> True,
"InlineCompiledFunctions" -> True},
RuntimeAttributes -> {Listable}, Parallelization -> False
]];

CompilePrint[testCompile]

Out[3]= "
2 arguments
4 Real registers
Underflow checking off
Overflow checking off
Integer overflow checking off
RuntimeAttributes -> {Listable}

R0 = A1
R1 = A2
Result = R3

1   R2 = R1 * R0
2   R3 = MainEvaluate[ Hold[InterpolatingFunction[{{0., 15.}}, <>]][ R2]]
3   Return
"

The options are set as in the case of my application.

Is there any way to access circumvent this the non compilabilty of InterpolatingFunction by accessing for example the resulting piece wise polynomial?

• Have you seen this? Of course there are other methods of interpolation that InterpolatingFunction supports. – Michael E2 Mar 20 '17 at 1:48
• Possibly you could rearrange your code such that all interpolation is done before passing that result as a packed array to the compiled function? – user21 Mar 20 '17 at 10:33
• @MichaelE2 sort of, it would boil down to writing my own compiled interpolation, which i will probably end up with. – Gebbo Mar 20 '17 at 12:26
• @user21 I don't quite understand what you mean. – Gebbo Mar 20 '17 at 12:26
• Yes, to be more specific the data/interpolation serves as an input for solving a differential equation and is only loaded once in the beginning. – Gebbo Mar 20 '17 at 14:43

Using existing code from here to extract the piece-wise polynomial from the interpolation and compile it.

data = MapIndexed[
Flatten[{#2, #1}] &, {2, 5, 9, 15, 22, 33, 50, 70, 100, 145, 200, 280, 375, 495, 635, 800, 1000, 1300, 1600, 2000, 2450, 3050, 3750, 4600, 5650, 6950}];

intF = Interpolation@data;
pwF[x_] = Piecewise[MapIndexed[{InterpolatingPolynomial[#1, x], x < 1 First[#2] + 2} &, Most[#]], InterpolatingPolynomial[Last@#1, x]] &@Partition[data, 4, 1];
compF = With[{}, Compile[{{x, _Real}}, Evaluate[N[pwf[x]]], CompilationTarget -> "C", "RuntimeOptions" -> "Speed", RuntimeAttributes -> {Listable}, CompilationOptions -> {"InlineExternalDefinitions" -> True}]];

compF[1.]//AbsoluteTiming
pwF[1.]//AbsoluteTiming
intF[1.]//AbsoluteTiming
{7.38984*10^-6,2.}
{0.0000640453,2.}
{0.0000225801,2.}

This solves the problem at hand and even speeds up the evaluation.

• Unfortunately, at least for me in 11.2, CompilePrint shows this too is bailing out to MainEvaluate – b3m2a1 Jan 8 '18 at 20:17
• @b3m2a1 wF = Which @@ Flatten[List[ MapIndexed[{x < 1 First[#2] + 2, InterpolatingPolynomial[#1, x]} &, Most[#]], {True, InterpolatingPolynomial[Last@#1, x]}] &@ Partition[data, 4, 1]]; then compF = With[{wF = wF}, Compile[{{x, _Real}}, wF, CompilationTarget -> "WVM", "RuntimeOptions" -> "Speed", RuntimeAttributes -> {Listable}, CompilationOptions -> {"InlineExternalDefinitions" -> True}]] – QuantumDot Jan 24 '18 at 21:25


text:
Dynamic Ordered Weighted Averaging Functions for Complete Lattices1footnote 11footnote 1Preprint submited to Soft Computing

# Dynamic Ordered Weighted Averaging Functions for Complete Lattices111Preprint submited to Soft Computing

Antonio Diego S. Farias Antonio Diego S. Farias Federal Rural University of Semi-Arid - UFERSA, Universitary Campus of Pau dos Ferros, BR 226, KM 405, São Geraldo, 59.900-000, Pau dos Ferros, RN, Brazil
22email: antonio.diego@ufersa.edu.brRegivan H. N. Santiago Benjamín BedregalDepartment of Informatics and Applied Mathematics - DIMAp, Federal University of Rio Grande do Norte - UFRN, Avenue Senador Salgado Filho, 3000, Universitary Campus of Lagoa Nova, 59.078-970, Natal, RN, Brazil
Regivan H. N. Santiago Antonio Diego S. Farias Federal Rural University of Semi-Arid - UFERSA, Universitary Campus of Pau dos Ferros, BR 226, KM 405, São Geraldo, 59.900-000, Pau dos Ferros, RN, Brazil
22email: antonio.diego@ufersa.edu.brRegivan H. N. Santiago Benjamín BedregalDepartment of Informatics and Applied Mathematics - DIMAp, Federal University of Rio Grande do Norte - UFRN, Avenue Senador Salgado Filho, 3000, Universitary Campus of Lagoa Nova, 59.078-970, Natal, RN, Brazil
Benjamín Bedregal Antonio Diego S. Farias Federal Rural University of Semi-Arid - UFERSA, Universitary Campus of Pau dos Ferros, BR 226, KM 405, São Geraldo, 59.900-000, Pau dos Ferros, RN, Brazil
22email: antonio.diego@ufersa.edu.brRegivan H. N. Santiago Benjamín BedregalDepartment of Informatics and Applied Mathematics - DIMAp, Federal University of Rio Grande do Norte - UFRN, Avenue Senador Salgado Filho, 3000, Universitary Campus of Lagoa Nova, 59.078-970, Natal, RN, Brazil
###### Abstract

In this paper we introduce a class of operators on complete lattices called Dynamic Ordered Weighted Averaging (DYOWA) functions. These functions provide a generalized form of an important class of aggregation functions: The Ordered Weighted Averaging (OWA) functions, whose applications can be found in several areas like: Image Processing and Decision Making. The wide range of applications of OWAs motivated many researchers to study their variations. One of them was proposed by Lizassoaim and Moreno in 2013, which extends those functions to complete lattices. Here, we propose a new generalization of OWAs that also generalizes the operators proposed by Lizassoaim and Moreno.

###### Keywords:
Aggregations functions t-norms t-conorms OWA functionsDYOWA functions Complete lattices.

## 1 Introduction

After the contributions of (Zadeh, 1965) in the field of Fuzzy Sets, many extensions of classical mathematical theories have been developed, with several possibilities of application. Applications in areas like: Image Processing and Decision Making require some special functions capable of encoding a set of multiple values in a single value; these functions are called: Aggregation functions (Beliakov et al, 2016; Bustince et al, 2013; Chen and Hwang, 1992; Dubois and Prade, 2004; Liang and Xu, 2014; Paternain et al, 2015, 2012; Zhou et al, 2008).

Aggregation functions can be classified into four classes: Averaging, conjunctive, disjunctive and mixed. The disjunctive and conjunctive aggregations functions provide, respectively, models for disjunctions and conjunctions in Fuzzy Logic (Beliakov et al, 2016; Bustince et al, 2010, 2012; Dimuro and Bedregal, 2014; Dubois and Prade, 1985; Klement et al, 2000; Farias et al, 2016b). On the other hand, averaging aggregation functions can be applied, for example, in fields like image processing and decision making (Paternain et al, 2015; Bustince et al, 2011; Yager, 1988; Zadrozny and Kacprzyk, 2006).

A special type of averaging aggregation is called: Ordered Weighted Averaging function, or simply OWA, function. It was developed by Yager (Yager, 1988) with the intention to study the problem of multiple decision making, however many other applications for such operators have arisen since then (Paternain et al, 2015; Llamazares, 2015; Torra and Godo, 2002; Lin and Jiang, 2014).

Some variations of OWAs can be found in literature; e.g. see (Chen and Hwang, 1992; Cheng and Chang, 2006; Merigó and Gil-Lafuente, 2009; Merigó, 2012; Yager, 2006). All of them are defined on the set . In 2013, Lizasoain and Moreno (Lizasoain and Moreno, 2013) generalized those operators to any complete lattice .

All of such different approaches of OWAs have an essential common factor: They use a fixed vector of weights for the final calculation. In this paper, we propose a new way of generalization of OWAs on complete lattices; the vector of weights is determined from the input arguments providing a “dynamic flavour”. More precisely, the weights are variables defined from the input vector.

We start this paper by exposing some basic concepts such as: Aggregation functions, OWAs, T-norms and T-conorms. Sections 3 and 4 provide the extension of some concepts previously listed to complete lattices; they also expose the generalization proposed by Lizasoain and Moreno. In section 5, we introduce our proposal of generalizing OWA for complete lattices, we study some of its properties and present some examples in different environments. We will show in this part of the paper that the OWA functions proposed here, as well as those proposed by Yager, are averaging functions. We will also prove that the Yager operators can be obtained as a particular case of our OWA operators. To conclude, we bring the section of conclusions and future works.

## 2 Aggregation Functions

The aggregation functions are mathematical tools that allow you to perform grouping complex information into a more simple information. More precisely, these functions are rules that associate each -dimensional input to a unique value, the output. The formal definition is presented below:

###### Definition 1 (Aggregation Function)

A function which satisfies the following properties:

1. and ;

2. whenever for all .

is called of n-ary aggregation function.

Applications of aggregation functions can be found, for example, in decision-making problems and in the formulation of some fuzzy logic connectives (see (Beliakov et al, 2016)). In the following, we introduce some notations that will be used in this paper.

###### Remark 1
1. We use to denote the -dimentional vector whose coordinates belong to the set .

2. Functions as and are classical example of n-ary aggregations function.

3. In order to simplify the terminology in some points of the text we use the term aggregate function instead of n-any aggregation function.

Aggregation functions can be classified into four different types:

###### Definition 2

Let be an aggregation function. We say that is a:

1. Averaging aggregation function if for any ;

2. Conjuntive aggregation function if for all ;

3. Disjuntive aggregation function if for all ;

4. Mixed aggregation function if it does not belong to any of the previous classes.

Table 1 presents some examples of aggregation functions.

###### Definition 3

A function satisfies the properties of:

1. Idempotency if for all ;

2. Symmetry if for any permutation of the set we have ;

3. Neutral element if there is a element such that for all allocated in any coordinate we have to ;

4. Absorption if has an absorption element , i.e., if for all we have to ;

5. Homogeneity if for any we have to ;

6. Zero divizor if there is such that ;

7. One divizor if there is such that ;

8. Associativity if and for any .

Table 2 presents some examples of aggregations functions which satisfy such properties.

### 2.1 OWA Functions

The Ordered Weighted Averaging – OWA function, defined by Yager in (Yager, 1988), constitute an important family of averaging aggregation functions, which have been widely studied by many researchers around the world, motivated by its wide range of applications. Applications of OWA can be found, for example, in image processing (Paternain et al, 2015; Bustince et al, 2011; Zadrozny and Kacprzyk, 2006), in neural networks (Amin and Emrouznejad, 2011a, b; Emrouznejad, 2008) and in decision making (Cheng and Chang, 2006; Ahn, 2008; Miguel et al, 2016). The definition of this important class of functions is presented below:

###### Definition 4 (OWA Funtion)

Given a -dimentional vector of weights 222A -dimentional vector of weights is such that . , the function

 OWA→w(→x)=n∑i=1wix(i),

where is the descending ordernation of the vector , is called of Ordered Weighted Averaging function or simply OWA function.

It is not difficult to show that for any vector of weights , the function is an averaging aggregation function. Furthermore, are continuous functions which satisfy: (IP), (SP) and (HP), but do not: (ZD) and (OD). They are parametric functions; namely: Depending on the vector of weights it will simulate an average aggregation function. Below, we present some examples:

###### Example 1
1. is obteined by vector of weights ;

2. can be obteined by vector of weights ;

3. is the OWA function with ;

4. The median,

 med(x1,⋯,xn)=⎧⎪⎨⎪⎩x(k)+x(k+1)2, if n=2kx(k+12), otherwise

can be found from:

• If is odd, then for all and .

• If is even, then for all and , and .

### 2.2 t-norms and t-conorms

Some aggregation functions provide models for conjunctions and disjunctions in fuzzy logic. These operators are called respectively of t-norms and t-conorms:

###### Definition 5 (t-norms)

A t-norm is a function which satisfies:

1. for all ;

2. for any ;

3. for any ;

4. whenever .

###### Definition 6 (t-conorms)

A t-conorm is a function such that:

1. for any ;

2. for all ;

3. for all ;

4. whenever .

T-norms are conjunctive and t-conorms are disjunctive aggregation functions. Table 3 contains some examples of t-norms and t-conorms. The reader can find in (Klement et al, 2000) a deeper insight about t-norms and t-conorms on and in (Bedregal et al, 2006; Baets and Mesiar, 1999; Cooman and Kerre, 1994; Palmeira et al, 2014) on some class of the lattices.

## 3 Aggregations, t-norms and t-conorms for complete lattices

A complete lattice is a partial order, , in which any subset has supremum and infimum elements, denoted respectively by and (Birkhoff, 1961; Gierz et al, 1980). Complete lattices are bounded; i.e. they have top, , and bottom elements, .

The properties (IP), (SP), (NP), (AP), (HP), (ZD), (OD) and (ASP) can be extended to lattices, as well as: aggregations, t-norms and t-conorms.

###### Definition 7

An isotonic function333A function is isotonic if, , whenever , for all . such that:

1. ;

is called of aggregation function on .

###### Definition 8 ((Baets and Mesiar, 1999))
1. An isotonic binary operator which satisfies (SP) and (ASP), and have as neutral element is a t-norm on .

2. An isotonic binary operator that satisfies (SP) and (ASP), and have as neutral element is a t-conorm on .

The associativity of and allows us to define n-any operators, as follow:

 n⨁i=1xi=((((x1⊕x2)⊕x3)⊕⋯⊕)xn−1)⊕xn;

and

 n⨂i=1xi=((((x1⊗x2)⊗x3)⊗⋯)⊗xn−1)⊗xn.
###### Proposition 1

Let be a t-norm and a t-conorm on a complete lattice . Then, for any are valid:

1. and ;

2. and ;

3. and ;

4. .

## 4 OWA operators for complete lattices

Several variations of OWA functions defined on the interval can be found in literature; e.g. IGOWA, IGCOWA, POWA and cOWA (Merigó and Gil-Lafuente, 2009; Merigó, 2012; Yager, 2006; Chen and Zhou, 2011). Another approach is due to Lizasoain and Moreno (Lizasoain and Moreno, 2013) which generalized OWAs to complete lattices.

###### Definition 9 (Definition 3.3 of (Lizasoain and Moreno, 2013))

Let be a complete lattice and be a t-norm and a t-conorm. We say that is a:

1. vector of weights on whenever ;

2. distributive vector of weights on whenever it satisfies the (i) and

 a⊗(n⨁i=1wi)=n⨁i=1(a⊗wi), for any a∈Ln.
###### Remark 2

If is a complete lattice and and , then is a:

1. vector of weights if, and only if, ;

2. distributive vector of weights if, and only if, satisfies and , for all .

To calculate the output of an OWA (in the sense of Yager), we need to sort the n-dimensional input vector in a decreasing way. This process is always possible when the underlying complete lattice is the linear order, but there are complete lattices with pairs of non-comparable elements. For this reason, we need to define an auxiliary vector from the input vector. This is done using the following Lemma:

###### Lemma 1 (Lemma 3.1 of (Lizasoain and Moreno, 2013))

Let be a complete lattice. For any , consider the following values:

• .

Then, . If is totally ordered, then there is a permutation, , for the set , such that .

A proof of this Lemma can be found in (Lizasoain and Moreno, 2013). To simplify the notations we use the following definition:

###### Definition 10

If is a complete lattice, then the function defined by:

 LM(a1,a2,⋯,an)=(b1,b2,⋯,bn),

where is the -dimentional vector obtained according to Lemma 1, is called of Lizassoain-Moreno function.

###### Example 2

If is a complete lattice and , then:

 b1 = a1∨a2∨a3∨a4 b2 = ⋁{a1∧a2,a1∧a3,a1∧a4,a2∧a3, a2∧a4,a3∧a4} b3 = ⋁{a1∧a2∧a3,a1∧a2∧a4,a1∧a3∧a4, a2∧a3∧a4} b4 = a1∧a2∧a3∧a4

In the following, we list some properties of Lizassoain-Moreno function:

###### Proposition 2 (Properties of Lizassoain-Moreno function)

If is a complete lattice, then:

1. If is such that any pair of coordinates and , with , is comparable, then , where is a permutation on the set such that .

2. If is a linear order, then for all there is a permutation on the set such that .

3. If , then .

4. For any permutation for and for all , .

###### Proof
1. Straightforward from Lemma 1.

2. Since is a linear order, then any satisfies . Thus, for any there is a permutaion such that .

3. Straightforward from definition of Lizassoain and Moreno funcion.

4. As , where then, by follows that for all ,

 LM(LM(a1,⋯,an)) = LM(b1,⋯,bn) = b1,⋯,bn = LM(a1,⋯,an)
5. Let be and . By definition, we have to:

 ck = ⋁(j1,…,jk)⊆{1,⋯,n}aσ(j1)∧⋯∧aσ(jk) = ⋁(j1,…,jk)⊆{1,⋯,n}aj1∧⋯∧ajk = bk

Therefore, .

Now that we have defined the Lizassoain-Moreno function and know some of its properties, it is possible to define a generalized version of OWAs for complete lattices:

###### Definition 11 (Definition 3.5 of (Lizasoain and Moreno, 2013))

Let be a distributive vector of weights in a complete lattice . For any , consider the totally decreasing ordered vector . The Lizasoain-Moreno OWA function associated with and the triplet is

 LMOWA→w(→a)=n⨁i=1(wi⊗bi) (1)

Examples and properties of Lizasoain-Moreno OWA can be found in (Lizasoain and Moreno, 2013), it is noteworthy that Yager’s OWA is a particular case of Lizasoain-Moreno’s OWA:

###### Theorem 1

Every Yager’s OWA is an LMOWA.

###### Proof

Let , , and be a vector of weights. Since, and , for all , then is a distributive vector of weights.

To prove that coincides with the Yager’s OWA, first note that the Proposition 2 ensures that for any input vector there is a permutation on such that . Besides,

 xσ(1)≥xσ(s)≥⋯≥xσ(n),

that is, . Therefore, for all it is verified that:

 LMOWA→w(x1,⋯,xn) = n⨁i=1(wi⊗bi) = SLK(w1⊗b1,…,wn⊗bn) = min(n∑i=1(wi⋅xσ(i)),1) = n∑i=1(wi⋅xσ(i)) = OWA→w(x1,⋯,xn)
###### Remark 3
1. OWA’s satisfies the properties (IP) and (SP). Futhermore, for any distributive vector of weights and all we have

 a1∧⋯∧an≤OWA→w(a1,⋯,an)≤a1∨⋯∨an

Now, observe that both: Yager’s and Lizasoain-Moreno’s OWAs are obtained from a unique fixed vector of weights . In (Farias et al, 2016a, c) we propose a generalization of Yager’s OWA, in such a way that the weights are not fixed. In this sense, we propose here a generalization of Lizasoain-Moreno’s OWA taking into account nonfixed weights.

## 5 Dynamic Ordered Weighted Averaging Functions

In the sequel we propose and investigate a generalized form of OWA for complete lattices; they are named Dynamic Ordered Weighted Averaging (DYOWA) functions. The DYOWA functions generalize both Yager’s and Lizasoain-Moreno’s OWA. In order to to introduce them, we need first to define the notion of weights function.

###### Definition 12 (Weight function)

Let be the structure , where is a complete lattice, is a t-norm and is a t-conorm. A finite family of functions is called of weight function family whenever for all , is a vector of weights on . The natural function , s.t. is called weight function on  444Or just weight function whenever is clear in the context.. If furthermore, for all ,

 c⊗(n⨁i=1fi(→a))=n⨁i=1(c⊗fi(→a))

is called distributive weight function on or simply that is a distributive family.

###### Remark 4

Since then, by (T1), .

The following are some examples of distributive families:

###### Example 3

Let be a complete lattice, and . Then a weight family of functions must satisfy

 n⋁i=1fi(→a)=⊤L.

In particular, if for all , and for , then is a weight function. Furthermore,

 c∧(n⋁i=1fi(→a))=c∧⊤L=c=c∨⊥L=n⋁i=1(c∧fi(→a)),

that is, is a distributive family. Analogously, if and for , then is also a distributive family.

###### Example 4

Consider , and . A distributive family must satisfy:

 f1(→x)+⋯+fn(→x)=1,

and

 c=min(c⋅f1(→x)+⋯+c⋅fn(→x),1)

for any and each . In particular, , with

 fi(x1,⋯,xn)=⎧⎪ ⎪⎨⎪ ⎪⎩1n, if x1=⋯=xnx1n∑i=1xi, otherwise

satisfies these properties. Therefore, is a distributive family.

###### Example 5

Let be , where and is the Kulisch-Miranker partial order (Kulisch and Miranker, 1981), i.e., . Moreover, and are a t-norm and a t-comorm, respectively, on (See Bedregal and Takahashi (Bedregal and Takahashi, 2006)). It is easy to verify that the finite family of functions formed by given by (constant functions) provides a distributive family.

Now we can define our proposed generalized form of OWA.

###### Definition 13 (DYOWAs)

Given a complete lattice , a t-norm , a t-conorm and a weigtht function family , we call of Dynamic Ordered Weighted Averaging Function (DYOWA), the function:

 DYOWAΓ(→a)=n⨁i=1(fi(→a)⊗bi),

where .

Below we will present some examples of DYOWA functions.

###### Example 6

Let , , and defined in Example 3, then and are:

 DYOWAΓ1(→a) = n⋁i=1(fi(→a)∧bi) = (⊤L∧b1)∨(⊥L∧b2)∨⋯ ∨(⊥L∧bn) = b1∨⊥L∨⋯∨⊥L = b1 = a1∨a2∨⋯∨an

and

 DYOWAΓ2(→a) = n⋁i=1(gi(→a)∧bi) = (⊥L∧b1)∨⋯∨(⊥L∧bn−1) ∨(⊤L∧bn) = ⊥L∨⋯∨⊥L∨bn = bn = a1∧a2∧⋯∧an

In addition, and are isotonic functions which satisfy (IP), (SP), (NP), (AP) and (ASP), but do not satisfy (ZD) and (OD).

###### Example 7

If , and are defined as in Example 4, then

 DYOWAΓ(x1,⋯,xn)=n∑i=1x2in∑j=1xj=n∑i=1x2in∑j=1xj.

Futhermore, satisfies (IP) and (SP), but do not (NP), (HP), (ZD), (OD) and (AP). It is important to note that, when , this DYOWA function is not monotonic, since and .

###### Example 8

For , , and provided in Example 5 a formulae to calculate for any dimension is difficult to find. However, for this can be done by observing that for :

 [x––,¯¯¯x]∧KM[y–,¯¯¯y]=[min(x––,y–),min(¯¯¯x,¯¯¯y)]

and

 [x––,¯¯¯x]∨KM[y–,¯¯¯y]=[max(x––,y–),max(¯¯¯x,¯¯¯y


text:
# Proof of differential and integral identities used in electromagnetics radiation

I am starting my studies in antenna theory and need help to prove the following identities:

I) $$\nabla^{'}\left[\mathbf{J}(\mathbf{r^{'}})e^{j\mathbf{k}\cdot\mathbf{r^{'}}}\right] = j\mathbf{k}\cdot\mathbf{J}(\mathbf{r^{'}})e^{j\mathbf{k}\cdot\mathbf{r^{'}}} - j\omega\rho(\mathbf{r^{'}})e^{j\mathbf{k}\cdot\mathbf{r^{'}}}$$ and

II) $$\mathbf{k}\cdot\int_V\mathbf{J}(\mathbf{r^{'}})e^{j\mathbf{k}\cdot\mathbf{r^{'}}} d^3\mathbf{r^{'}} = \omega \int_V\rho(\mathbf{r^{'}})e^{j\mathbf{k}\cdot\mathbf{r^{'}}}d^3\mathbf{r^{'}}$$

Notation and hypotheses:

1) $$\mathbf{J}$$ and $$\rho$$ are the current and charge densities, respectively, and both are restricted to the integral volume V (i.e. outside V both are null);

2) The notation for the distance $$\mathbf{r^{'}}$$ is as follows:

3) $$\mathbf{k} = k\mathbf{\hat{k}}$$, with $$k=\omega \sqrt{\mu \epsilon} = \omega/c$$, c is light velocity, $$\mu$$ and $$\epsilon$$ electromagnetics constants, $$\omega$$ wave frequency $$\mathbf{\hat{k}}$$ is the unit vector in the direction of the wave propagation.

• The second one is the continuity equatio in fourier space. You need to be more explicit about time dependency. Probably rho is something like rho hat time exp iwt. The time dependecy of rho and J is the key to this question. Look it up in the book how tjey are defining it. – lalala Jun 1 '19 at 19:56
• What are your thoughts on the problem, you should show some attempt at a solution so we can understand exactly what is tripping you up – Triatticus Jun 1 '19 at 20:13


text:
# nLab phase space

### Context

#### Variational calculus

variational calculus

# Contents

## Idea

The covariant phase space of a system in physics is the space of all of its solutions to its classical equations of motion, the space of classical trajectories of the system. Often one considers a parameterization of this by boundary data or choice of a Cauchy surface. This parameterization is what traditionally is just called a “phase space”. The “covariant” in “covariant phase space” is to indicated that it comes without any unnatural choices.

For a system described by Lagrangian mechanics, the covariant phase space comes canonically equipped with a presymplectic structure. A proper phase space or reduced phase space is a quotient space of the covariant phase space on which the presymplectic structure refines to a symplectic structure or Poisson strucure.

Typically these phase spaces are (locally) naturally parameterized by the suitable boundary conditions which uniquely determine the corresponding history of the physical system. Much of the literature on phase spaces deals with parameterizing these boundary conditions.

For instance for a non-relativistic particle propagating on a Riemannian manifold $X$ with the usual action functional, a trajectory is uniquely fixed by the position $x \in X$ and the momentum $p \in T^*_x X$ of the particle at a given time. Correspondingly the space of all solutions and hence the (covariant) phase space of the system may be identified with the cotangent bundle $T^* X$ of $X$.

(The term “phase” in “phase space” can be related to the phase of complex numbers in this example, see at phase and phase space in physics.)

However, even reduced phase spaces are not all cotangent bundles, typically not, for instance, if they are obtained by symplectic reduction. This way a finite-dimensional phase space can sometimes describe continuous systems (e.g. in hydrodynamics) whch have infinitely many degrees of freedom; that phase space is however not a cotangent bundle of something in general.

## Covariant phase space

There are two main routes to the construction of the covariant phase space,

### (S) Via pre-symplectic structures

We describe the canonical presymplectic structure on the covariant phase space of a local action functional. The covariant phase space is defined as the space of critical points of an action functional or, equivalently, the space of solutions of its Euler-Lagrange equations, also known as the shell. The shell is naturally embedded as a subset of the space of all field configurations. Below, terminology and notation are as in the discussion at variational bicomplex.

Let $E \to X$ be a smooth fiber bundle over an $n$-dimensional spacetime $X$ and $j_\infty E$ the corresponding jet bundle. The total de Rham differential on $j_\infty E$ decomposes, $\mathbf{d} = d + \delta$, into the anti-commuting horizontal and vertical differentials, $d$ and $\delta$. The local action functional

$S : \Gamma(E) \to \mathbb{R}$

is by definition given by a Lagrangian

$L : \Gamma(j_\infty E) \to \Omega^{n}(X)$

as

$S : \phi \mapsto \int_X L(j_\infty(\phi)) \,.$

The variation of the action $S$ can be written in terms of the vertical differential:

$\delta S (\phi) = \int_X (\delta L)(j_\infty(\phi)) \,,$

where the first $\delta$ the variational differential (as interpreted in the bicomplex definition) and the second $\delta$ is the vertical differential. Thus, for the purposes of variational calculus, we can concentrate purely on the vertical differential of the Lagrangian, which canonically decomposes as follows:

$\delta L = EL(\phi)\delta\phi - d \theta(\phi) \,,$

where $EL(\phi) = 0$ is the Euler-Lagrange equation on $\phi$, and where $EL(\phi)\delta\phi$ is a degree-$(n,1)$ and $\theta$ is a degree-$(n-1,1)$ element in the variational bicomplex (one variational form degree and, respectively, $n$ or $(n-1)$-spacetime form degrees).

###### Remark

On a local coordinate patch $\{x^i\}$ for $X$ the form $\theta$ here is given by

$\theta(\phi) = (\iota_{\partial_i} \frac{\delta L}{\delta \phi^a_{,i}} ) \wedge \delta \phi^a \,.$

If $L = L_{kin} + L_{pot}$ is the sum of a standard kinetic Lagrangian for a free field theory and a potential term that only depends on the fields themselves and not on their derivatives, then this is at the same time the canonical multisymplectic form for the given field bundle. See at multisymplectic geometry the section Examples – Free field theory for more on this relation.

The above definition of $EL$ and $\theta$ in terms of $\delta L$ yields the following identity upon taking another exterior variational derivative of both sides

$\delta(\delta L) = 0 = \delta(EL(\phi)) \wedge \delta\phi + d \delta \theta(\phi) \,,$

where the first term on the right clearly vanishes when pulled back to the shell, $EL(\phi)=0$ on $X$. The above wedge product between variational forms is inherited from the wedge product on $\Omega^\bullet(j_\infty E)$. This implies that the presymplectic current density, $\omega(\phi) = \delta(\theta(\phi))$, is horizontally closed on shell:

\begin{aligned} d \iota^* \omega(\phi) &= d \iota^* (\delta \theta(\phi)) \\ &= \iota^* d (\delta \theta(\phi)) \\ &= -\iota^* \delta(EL(\phi)) \wedge \delta\phi \\ &= 0 \, , \end{aligned}

where $\iota: \mathcal{S}_L \to \Gamma(E)$ is the embedding of the solutions of the Euler-Lagrange equations (the shell) into the space of all field configurations. The reason is that $\iota^* \delta(EL(\phi)) = 0$ for each $x\in X$, since the functions $EL(\phi)$ are all constant (in fact $0$) on solutions.

The variational 1-form on the space of field configurations

$\Theta = \int_{X|_{in}} \theta(\phi)$

given by an integration over a Cauchy surface $X|_{in}$ is the potential for the presymplectic form

$\Omega = \delta \Theta = \int_{X|_{in}} \delta(\theta(\phi)) = \int_{X|_{in}} \omega(\phi)$

on the space of field configurations. Since $\omega(\phi)$ is horizontally closed on shell, the the pullback of the presymplectic form $\iota^* \Omega$ is independent of the choice of the surface $X|_{in}$ (provided the choice is restricted to a single homology class of surfaces).

###### Claim

The presymplectic form $\iota^* \Omega$ on the covariant phase space is symplectic iff the linearized Euler-Lagrange equations, $EL(\phi)=0$, have a locally well-posed initial value problem on $X|_{in}$. In particular, in the presence of gauge symmetries, due to the failure of uniqueness of solutions for given initial data on $X|_{in}$, the form $\iota^*\Omega$ is only presymplectic.

However, the infinitesimal actions of gauge symmetries exhaust the kernel of the $\iota^* \Omega$ and upon performing symplectic reduction, we obtain the space of orbits of solutions under the action of gauge symmetries, which is the physical or reduced phase space.

Notice that the form $\Omega$, on the field configuration space, does depend on the choice of Cauchy surface. Performing symplectic reduction gives the symplectic space of equivalence classes of solutions of equations of motion modulo gauge transformations, and hence also the reduced phase space. Thus, the end point of the reduction no longer depends on the choice of the Cauchy surface.

#### Application to the inverse problem of the calculus of variations

We discuss the inverse problem of variational calculus:

given a presymplectic form on the locus of solutions of a system of partial differential equations, when is it the covariant phase space of a local action functional?

(This section follows BridgesHydonLawson.)

We use same notation as the preceding section. Namely dependence on $\phi$ in local forms really means dependence on finitely many components of the infinite jet $j^\infty(\phi)$. Also, $\iota$ denotes the embedding of the space of solutions in the space of field configurations. Moreover, we presume to work on a sufficiently small neighborhoods in the space of solutions and field configurations that the Poincar'e lemma applies.

Consider a system of partial differential equations $P(\phi)=0$, together with a local presymplectic form $\Omega = \int_{X|_{in}} \omega(\phi)$, where $\omega(\phi)$ is a degree-$(2,dim X-1)$ element of the variational bicomplex, that is $\delta \omega = 0$. Suppose further that presymplectic current density $\omega(\phi)$ is horizontally conserved on solutions:

$d \iota^* \omega(\phi) = \iota^* d \omega(\phi) = 0 \quad \implies \quad d \omega(\phi) = P(\phi) \lambda(\phi) + \delta(P(\phi)) \wedge \mu(\phi) = P(\phi) (\lambda(\phi) - \delta\mu(\phi)) + \delta (P(\phi)\mu(\phi)) \, ,$

where $\lambda$ and $\mu$ are systems (suitably contracted with the $P(\phi)$ system) of degree-$(2,dim X)$ and degree-$(1,dim X)$ elements of the variational bicomplex. Using the variational closure of $\omega(\phi)$, we can conclude that $\delta(P(\phi)(\lambda(\phi)-\delta\mu(\phi))) = 0$ and thus, locally, $P(\phi)(\lambda(\phi)-\delta(\phi)) = \delta(P(\phi)\lambda'(\phi))$. (…Justify why the representative on the last RHS can be chosen proportional to $P(\phi)$…)

On the other hand, the variational closure of $\omega(\phi)$ also implies the existence of a degree-$(1,dim X-1)$ form $\theta(\phi)$, such that $\delta(\theta(\phi)) = \omega(\phi)$. The following identity then allows us to (locally) reconstruct a Lagrangian whose Euler-Lagrange equations are satisfied by solutions to $P(\phi)=0$.

\begin{aligned} \delta(d \theta(\phi)) &= - d(\delta\theta(\phi)) \\ &= - d \omega(\phi) \\ &= - \delta[P(\phi)(\lambda'(\phi)+\mu(\phi))] \\ \implies d\theta(\phi) - \delta L(\phi) &= -P(\phi)\lambda''(\phi) \, , \end{aligned}

where $\lambda''(\phi)$ is a degree-$(1,dim X)$ form and $L(\phi)$ is a Lagrangian degree-$(0,dim X)$ form. Rearranging the last equality as

$\delta L(\phi) = P(\phi)\lambda''(\phi) + d\theta(\phi) \, ,$

we conclude that the Euler-Lagrange equations of $L(\phi)$ are satisfied on solutions of $P(\phi)=0$, since $EL(\phi)\delta\phi = P(\phi)\lambda''(\phi)$.

### (P) Via Poisson structures

The covariant phase space can be embedded into the space of field configurations as a subspace of the set of solutions that transversely intersects gauge orbits. This embedding is characterized as the zero locus of the equations of motion and some gauge fixing conditions. The non-degenerate Poisson structure on the algebra of functions on the covariant phase space is given by the Peierls bracket.

The Peierls bracket of two functions $A$ and $B$ is the antisymmetrized influence on $B$ of an infinitesimal perturbation of a gauge-fixed action by function that restricts to $A$ on the embedding. The algebra of functions on the space of field configurations becomes a Poisson algebra in the following way. Pick a set of functions on the space of field configurations that restrict to a non-degenerate coordinate system on the embedded covariant phase space. These functions, together with the equations of motion and gauge fixing conditions define a Poisson bivector by being declared canonical, such that the kernel of the bivector coincides with the ideal generated by the equations of motion and the gauge fixing conditions. Obviously the Poisson structure thus constructed on the algebra of functions on field configurations is not unique and depends on the above choice of coordinates; the same non-uniqueness may be parametrized instead by a choice of a connection on the space of field configurations. The embedded covariant phase space becomes a leaf of the symplectic foliation of the space of field configurations.

### Via the BV-complex

The BV-BRST complex of a local action functional is (the formal dual to) a resolution of the reduced covariant phase space (the quotient of the covariant phase space by symmetries). As discussed in more detail at BV-BRST complex the ghost sector of that complex is a model for the quotient by the symmetries, whereas the antifield/antighost sector is a model for the critical locus of the action functional.

Moreover, by the nature of its construction, the BV-complex is canonically equipped with a graded symplectic form $\Omega$, whose (-1)-graded Poisson bracket is called the antibracket (essentially the canonical Schouten bracket on graded derivations, see at derived critical locus). This is not the canonical symplectic form $\int_\Sigma \omega$ on the reduced phase space, as discussed above, but it is something like a potential for it.

We want to make the following

###### Claim

Given a local action functional on a space of fields over a spacetime $X$. Let $d_{BV}$ denote the differential of the BV-BRST complex and let $d$ denote the horizontal de Rham differential on $X$. Then

$d_{BV} \int_\Sigma \Omega = \int_X d \omega \,.$

If $X$ is a globally hyperbolic spacetime of the form $\Sigma \times [0,1]$ then this is

$d_{BV} \int_\Sigma \Omega = \int_{\Sigma_{out}} \omega - \int_{\Sigma_{in}} \omega \,.$

We discuss this now in more detail. (The stament then also appears in Cattaneo-Mnev-Reshetikhin 12, equation (9)).

Write

• $X$ for the spacetime on which the fields are defined;

• $Conf = Maps(X,V) = \Gamma_X(X \times V)$ for the configuration space of fields on $X$, where $V$ is some vector space (for simplicity);

• $Conf_{BV}$ for the BV-extension; $V_{BV}$ for the corresponding graded vector space;

• $\{v_a\}$ for a chosen basis of $V_{BV}$;

• $\Phi^a(x) \in \Omega_{loc,BV}^{0,0}(X \times Conf_{BV})$ for the functional whose value on $\phi^a v_a \in Conf$ is $\phi^a(x)$ (for $x \in X$);

• $\Omega_{loc,BV}^{\bullet,\bullet}(X \times Conf_{BV})$ for the corresponding variational bicomplex.

• $\bar \Phi_a(x) \in \Omega^{dim X,0}_{loc}(X \times Conf_{BV})$ for the antifield corresponding to $\Phi^a(x)$ (which is an antighost if $\Phi^a(x)$ is a ghost).

Then the symplectic form density $\Omega$ for the antibracket

$\Omega \in \Omega^{(n,2)}_{loc, BV}(X \times Conf_{BV})$

is

$\Omega = \int_X d_{var} \bar \Phi_a(x) \wedge d_{var} \Phi^a(x) \,.$

Then,

\begin{aligned} d_{BV} \int_\Sigma \Omega & = d_{BV} \left( \int_\Sigma d_{var} \bar \Phi_a(x) \wedge d_{var} \Phi^a(x) \right) \\ & = - d_{var} (d_{BV} \int_\Sigma \bar \Phi_a(x)) \wedge d_{var} \Phi^a(x) \end{aligned}

We observe that the term in parenthesis is – in the notation at derived critical locus (so we are assuming now the assumptions made there) –

$[\hat S + d_{BRST}, d_{W(BRST)}] = [\hat S, d_{W(BRST)}] \,.$

Hence

\begin{aligned} \cdots & = - d_{var} EL_a(x) \wedge d_{var} \Phi^a(x) \\ & = - \int_X d_{var} EL \end{aligned} \,,

where $EL \in \Omega^{dim X, 1}_{loc, BV}(X \times \mathrm{Conf}_{BV})$ is the Euler-Lagrange density as in Zuckerman, p. 267. By equation g) there, this is

$\cdots = - \int_X d \omega \,.$

## Examples

### Relativistic particle

The covarint phase space of the relativistic particle on a pseudo-Riemannian manifold $X$ is the space of geodesics of $X$ (in the absence of a background gauge field).

### Chern-Simons theory

For Chern-Simons theory corresponding to a non-degenerate bilienear invariant polynomial $\langle -,-\rangle$ on a Lie algebra $\mathfrak{g}$ the

• configuration space is the space $\Omega^1(\Sigma, \mathfrak{g})$ of Lie algebra valued forms;

• covariant phase space is the space of field configurations $A$ whose curvature 2-form vanishes

$F_A = 0$
• $\Omega(\delta A_1, \delta A_2) = \int_{\Sigma_0} \langle \delta A_1 \wedge \delta A_2\rangle \,.$

See Chern-Simons theory and ∞-Chern-Simons theory for more details.

### In dg-geometry

(…)

Let the ambient context be that of dg-geometry. Let $C$ be an ordinary smooth manifold, assumed finite dimensional for the moment, and $\exp(i S) : C \to \mathbb{R}/\mathbb{Z}$ an ordinary smooth function such that its 0-locus is an sub-manifold.

Then a presentation for the homotopy fiber of $\exp(i S)$ is given by the formal dual of the dg-algebra

$(\wedge^{-\bullet}_{C^\infty(X)}\Gamma(T X), \iota_{(-)} d \exp(i S)) = \left[ \cdots \to \wedge_{C^\infty(X)}^2\Gamma(T X) \stackrel{{\iota_{(-)}d \exp(i S)}}{\to} \Gamma(T X) \stackrel{\iota_{(-)}d \exp(i S)}{\to} C^\infty(X) \right]$

concentrated in non-positive degree, which in degree $k$ has the $k$th exterior powers of the tangent vectors of $X$ and whose differential is given by contracting a tangent vector with the 1-form $d \exp(i S)$.

This is a Koszul resolution?-type resolution of the 0-locus of $\exp(i S)$. More generally, the homotopy fiber is given by a Koszul-Tate resolution-type complex. This is known as the antifield complex in the BV-BRST formulation of derived phase spaces.

(…)

Reductions of (pre-)symplectic manifolds:

symplectic geometryphysics
presymplectic manifoldcovariant phase space
$\downarrow$ gauge reduction$\downarrow$ quotient by gauge symmetry
symplectic manifoldreduced phase space
$\downarrow$ symplectic reduction$\downarrow$ quotient by global symmetry
symplectic manifoldreduced phase space

## References

A a popular introduction to the notion of phase space with some comments on the history of the concept are in

• David Nolte, The tangled tale of phase space, PhysicsToday (April 2010) (pdf)

An article reviewing much of the content of the following references is

### Covariant phase space

A standard textbook reference is chapter 17.1 of

Reviews of covariant phase space theory include:

• L. Vitagliano, Secondary calculus and the covariant phase space, pdf

• M. J. Gotay, J. Isenberg, R. Montgomery, J. E. Marsden, Momentum Maps and Classical Fields, Part I: Covariant Field Theory pdf

A discussion in the context of the variational bicomplex with further pointers to the use in physics is in

• E. Reyes, On Covariant Phase Space and the Variational Bicomplex , Int. J. Theor. Phys. 43, no 5 (2004) 12671286

A discussion in the language of D-modules, following the book Chiral Algebras and leading up to the derived covariant phase space by BRST-BV formalism is in section 8.3 of

The relation between covariant phase space methods and multisymplectic geometry is discussed in

• Frédéric Hélein, Multisymplectic formalism and the covariant phase, in Roger B ielawski, Kevin Houston, Martin Speight, J. Martin Speight (eds.) Variational problems in differential geometry, London Mathematical Society Lecture Note Series (2012) (arXiv:1106.2086)

• Thomas J. Bridges, Peter E. Hydon and Jeffrey K. Lawson, Multisymplectic structures and the variational bicomplex doi

• Forger, M. and Romero, S. V. Covariant poisson brackets in geometric field theory. Communications in Mathematical Physics 256, 375-410. (doi)

### Original articles on covariant phase space technology

In the following we give a commented list of references following the hostorical development.

It seems that there have been two independent lines of development, somewhat independent of each other, but also with some crosspollination along the way. One stream (P) was concerned with the construction of a Poisson structure on functions of solutions, while the other (S) was concerned with the construction of a symplectic form on the space of solutions. Obviously, the differences between the two kinds of constructions show up precisely in gauge theory systems.

The earliest papers are those of Peierls and Bergmann-Schiller in the early 50’s. They seem to have been self-motivated. Below, we try to list papers that have established key results or have served as important popularizers together with their main influences from previous works. The constructions of the (S) stream seem to have appeared nearly independently several times over several decades, until Lee-Wald and followups of Ashtekar’s papers became standard references. The (P) stream flowed slowly, but consistently from original idea of Peierls. The papers of Fredenhagen-Dütsch-et-al are a most readable modern formulation.

• R. Peierls, The commutation laws of relativistic field theory (1952) (jstor)

(P)

Influence: Appears to be self-motivated. The result may have been guessed from the known unequal-time, covariant Poisson brackets between free fields, which involve the causal Green function in an explicit way.

Result: The Peierls bracket on the covariant phase pace of a non-gauge system is defined and equivalence with the Hamiltonian phase space symplectic structure is proved. Gauge systems are treated by example of electrodynamics. The solution to degenerate equations of motion is either adding gauge fixing terms to the action or consider non-degenerate equations of motion satisfied by gauge invariant fields. Fermions are handled by multiplying fermi fields by formal odd parameters.

• Bergmann-Schiller, Classical and quantum field theories in the Lagrangian Formalism Phys. Rev. 89 4-16 (1953) (prola)

(S)

Influence: Appears to be motivated by Bergmann’s long term and “brute force” analysis of the gauge invariance structure of relativity and structurally similar theories. Another motivation is the possibility of writing divergence-less stress energy tensors as “curls” of “superpotentials”.

Result: The pre-symplectic potential form-current makes an appearance. The definitions of the covariant phase space and the resulting symplectic form on it are obscure (at least to me), but later papers make reference to them.

• Bergmann-Goldberg-Janis-Newman, Canonical Transformations and Commutators in the Lagrangian Formalism Phys. Rev. 103, 807–813 (1956) (prola)

(P&S)

Influence: Peierls, Bergmann-Schiller

Result: Proof of the equivalence between the Peierls bracket and the bracket obtained by Bergmann-Schiller for non-gauge systems. The treatment of gauge systems and many of the calculations are maybe a bit obscure.

• Komar, Commutators on Characteristic Surfaces Phys. Rev. 134, B1430–B1440 (1964) (proceedings w/ Bergmann 1962)

(S)

Influence: Bergmann-Schiller

Result: Uses the methods of Bergmann-Schiller to define Poisson brackets on initial data for linearized gravitational waves on null hypersurfaces, including at null infinity.

• DeWitt B.S., DeWitt C. (eds.) Relativity, Groups, and Topology (Les Houches 1963, Gordon and Breach, 1964), pp.585-820 (1964; lecture notes 1963)

(P)

Influence: Peierls

Result: A more detailed exposition of Peierls’ idea, with a bit more generality in the treatment of gauge systems. Becomes a standard reference along with Peierls’ original paper.

• Friedman, Generic instability of rotating relativistic stars Commun. math. Phys. 62, 247–278 (1978) (springer)

(S)

Influence: Bergmann-Schiller, Komar, … (?)

• Ashtekar-Magnon, On the symplectic structure of general relativity Communications in Mathematical Physics Volume 86, Number 1, 55-68, DOI: 10.1007/BF01205661 (1982) (springer)

(S)

Influence: Komar, also some more obscure papers by Fridmann and Palmer

Result: Write down the explicit pre-symplectic current and the corresponding pre-symplectic form on the space of solutions of linearized gravitational wave equations. This symplectic form on the reduced space of solutions is shown to coincide with the ADM symplectic structure and with the Komar symplectic structure at null infinity. The motivation explicit pre-symplectic current formula appears from the desire to interpolate between the above two formalisms.

• Edward Witten Interacting field theory of open superstrings Nuclear Physics B Volume 276, Issue 2, 13 October 1986, Pages 291-324 (1986) (web)

(S)

Influence: Appears to be self-motivated. Witten needed a covariant way to define Poisson brackets from the action of open string field theory. Acknowledges parallel, independent work of Zuckerman.

Result: Witten writes down the pre-symplectic form-current “by inspection” for a scalar field and for a Chern-Simons theory, then he explicitly shows that the current is conserved on the space of solutions, and that its integral over a Cauchy surface is variationally closed.

• Ashtekar, Bombelli, Koul, YS Kim, WW Zachary (eds.), The Physics of Phase Space: Nonlinear Dynamics and Chaos, Geometric Quantization, and Wigner Function (p.356) ISBN 0-387-17894-5 (1987; preprint 1986)

(S)

Influence: Ashtekar-Magnon

Result: Explicit formula for the symplectic form of full, nonlinear general relativity as an integral of a conserved form-current over an arbitrary Cauchy surface. Discussion of conversion of symmetries into conserved quantities using this form. Some of the aspects related to the construction of such conserved have apparently been treated in earlier works by Friedman, Sachs and possibly some others.

• G. J. Zuckerman, Action Principles and Global Geometry , in Mathematical Aspects of String Theory, S. T. Yau (Ed.), World Scientific, Singapore, 1987, pp. 259-284. (pdf)

(S)

Influence: Appears to be self-motivated. Possible motivation is a more general construction of conserved currents in variational problems, a la Noether. Acknowledges that he reproduces parallel, but applied to specific theories, work of Crnkovic-Witten and Ashtekar-Bombelli-Koul.

Result: The construction of the pre-symplectic potential form-current and pre-symplectic form-current are given in essentially modern terms. Not all proofs are given. Little discussion of symplectic reduction.

• C. Crnković, Edward Witten, Covariant Description of Canonical Formalism in Geometrical Theories, in Three Hundred Years of Gravitation, S. W. Hawking and W. Israel (Eds.), Cambridge University Press, Cambridge, 1987, pp. 676684. (pdf)

(S)

Influence: Witten

Result: Applies the “by inspection” methods of Witten’s earlier paper to write down conserved, variationally-closed pre-symplectic currents for Yang-Mills and general relativity.

• C. Crnković, Symplectic Geometry of the Covariant Phase Space , Class. Quant. Grav. 5 (1988) 15571575.

• J. Lee, Robert Wald, Local symmetries and constraints (1989) J. Math. Phys. 31, 725 (1990); doi:10.1063/1.528801 (jMP)

(S)

Influence: Crnković-Witten, Friedman

Result: Essentially gives the modern formulation as described above. The exposition is quite similar to Zuckerman (though no connection with that work is made), but with complete proofs.

• Ashtekar-Bombelli-Reula, The Covariant Phase Space of Asymptotically Flat Gravitational Fields in Mechanics, Analysis and Geometry: 200 Years after Lagrange edited by M. Francaviglia and D.~Holm, North-Holland, Amsterdam, 1990. (web)

(S)

Influence: Ashtekar-…

Result: Becomes standard reference. (?)

• Poisson Brackets on the Space of Histories Annals of Physics Volume 236, Issue 2, December 1994, Pages 374-391
(arXiv:hep-th/9308141)

The generalized Peierls bracket (arXiv:hep-th/9308150)

(1994; preprints 1993, thesis 1992)

(P)

Influence: Peierls, DeWitt; mentions but does not use the material from Lee-Wald, Crnkovic-Witten, Ashtekar

Result: Gives the construction outlined above.

• Stefan Hollands, Donald Marolf, Asymptotic generators of fermionic charges and boundary conditions preserving supersymmetry (arXiv) (2007, preprint 2006)

(S)

Influence: Lee-Wald

Result: Extends analysis to classical fermi fields.

• Dütsch Klaus Fredenhagen, The Master Ward Identity and Generalized Schwinger-Dyson Equation in Classical Field Theory (arXiv:hep-th/0211242) (2003),

Brennecke-Duetsch, Removal of violations of the Master Ward Identity in perturbative QFT (2008) (arXiv:0705.3160),

Rejzner, Fermionic fields in the functional approach to classical field theory (2011) (arXiv:1101.5126)

(P)

Influence: Peierls, DeWitt, Marolf; also some ideas related to retarded products that go back to Glaser-Lehmann-Zimmermann in the 1950s (more precisely: Glaser, V., Lehmann, H. and Zimmermann, W., “Field Operators and Retarded Functions” Nuovo Cimen. 6 (1957) 1122)

Result: Modern, elementary treatment of the Peierls bracket, including for classical fermi fields. The discussion is simplified by sticking to non-degenerate (or gauge fixed) actions. The choice of coordinates on the space of field configurations is simplified by considering only vector bundle valued fields.

### Reduced phase space

Standard textbooks on classical mechanics include

• Vladimir Arnold, Mathematical methods of classical mechanics

• H. Goldstein, Classical mechanics

• L. D. Landau, E. M. Lifshitz, Mechanics, (vol. I of Landau-Lifschitz Course on theoretical physics)

• R. Abraham, J. E. Marsden, Foundations of mechanics

• J. E. Marsden, T. Ratiu, Introduction to mechanics and symmetry

• wikipedia: phase space

### BV formalism

Discussion via BV-formalism includes

Revised on October 6, 2015 05:10:42 by Urs Schreiber (195.37.209.180)